diff options
Diffstat (limited to 'drivers/ata/sata_dwc_460ex.c')
-rw-r--r-- | drivers/ata/sata_dwc_460ex.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/ata/sata_dwc_460ex.c b/drivers/ata/sata_dwc_460ex.c index b02c4ffa4db0..0a9a774a7e1e 100644 --- a/drivers/ata/sata_dwc_460ex.c +++ b/drivers/ata/sata_dwc_460ex.c | |||
@@ -1642,13 +1642,12 @@ static int sata_dwc_probe(struct platform_device *ofdev) | |||
1642 | const struct ata_port_info *ppi[] = { &pi, NULL }; | 1642 | const struct ata_port_info *ppi[] = { &pi, NULL }; |
1643 | 1643 | ||
1644 | /* Allocate DWC SATA device */ | 1644 | /* Allocate DWC SATA device */ |
1645 | hsdev = kmalloc(sizeof(*hsdev), GFP_KERNEL); | 1645 | hsdev = kzalloc(sizeof(*hsdev), GFP_KERNEL); |
1646 | if (hsdev == NULL) { | 1646 | if (hsdev == NULL) { |
1647 | dev_err(&ofdev->dev, "kmalloc failed for hsdev\n"); | 1647 | dev_err(&ofdev->dev, "kmalloc failed for hsdev\n"); |
1648 | err = -ENOMEM; | 1648 | err = -ENOMEM; |
1649 | goto error; | 1649 | goto error; |
1650 | } | 1650 | } |
1651 | memset(hsdev, 0, sizeof(*hsdev)); | ||
1652 | 1651 | ||
1653 | /* Ioremap SATA registers */ | 1652 | /* Ioremap SATA registers */ |
1654 | base = of_iomap(ofdev->dev.of_node, 0); | 1653 | base = of_iomap(ofdev->dev.of_node, 0); |