aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/w1/masters/matrox_w1.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/w1/masters/matrox_w1.c')
-rw-r--r--drivers/w1/masters/matrox_w1.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/w1/masters/matrox_w1.c b/drivers/w1/masters/matrox_w1.c
index 6f9d880ab2e9..d356da5709fc 100644
--- a/drivers/w1/masters/matrox_w1.c
+++ b/drivers/w1/masters/matrox_w1.c
@@ -164,7 +164,7 @@ static int __devinit matrox_w1_probe(struct pci_dev *pdev, const struct pci_devi
164 if (pdev->vendor != PCI_VENDOR_ID_MATROX || pdev->device != PCI_DEVICE_ID_MATROX_G400) 164 if (pdev->vendor != PCI_VENDOR_ID_MATROX || pdev->device != PCI_DEVICE_ID_MATROX_G400)
165 return -ENODEV; 165 return -ENODEV;
166 166
167 dev = kmalloc(sizeof(struct matrox_device) + 167 dev = kzalloc(sizeof(struct matrox_device) +
168 sizeof(struct w1_bus_master), GFP_KERNEL); 168 sizeof(struct w1_bus_master), GFP_KERNEL);
169 if (!dev) { 169 if (!dev) {
170 dev_err(&pdev->dev, 170 dev_err(&pdev->dev,
@@ -173,7 +173,6 @@ static int __devinit matrox_w1_probe(struct pci_dev *pdev, const struct pci_devi
173 return -ENOMEM; 173 return -ENOMEM;
174 } 174 }
175 175
176 memset(dev, 0, sizeof(struct matrox_device) + sizeof(struct w1_bus_master));
177 176
178 dev->bus_master = (struct w1_bus_master *)(dev + 1); 177 dev->bus_master = (struct w1_bus_master *)(dev + 1);
179 178