diff options
Diffstat (limited to 'drivers/ata')
-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 b02c4ffa4db..0a9a774a7e1 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) const struct ata_port_info *ppi[] = { &pi, NULL }; /* Allocate DWC SATA device */ - hsdev = kmalloc(sizeof(*hsdev), GFP_KERNEL); + hsdev = kzalloc(sizeof(*hsdev), GFP_KERNEL); if (hsdev == NULL) { dev_err(&ofdev->dev, "kmalloc failed for hsdev\n"); err = -ENOMEM; goto error; } - memset(hsdev, 0, sizeof(*hsdev)); /* Ioremap SATA registers */ base = of_iomap(ofdev->dev.of_node, 0); |