]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/w1/masters/matrox_w1.c
Merge branch 'linus' into sched/urgent
[linux-2.6-omap-h63xx.git] / drivers / w1 / masters / matrox_w1.c
index 2788b8ca9bb1e882b127e23ec9550e2d6f76fe7f..1550431ccb6ade0b3b1ee556d3ea809f1c125132 100644 (file)
@@ -33,7 +33,6 @@
 #include <linux/slab.h>
 #include <linux/pci_ids.h>
 #include <linux/pci.h>
-#include <linux/timer.h>
 
 #include "../w1.h"
 #include "../w1_int.h"
@@ -164,7 +163,7 @@ static int __devinit matrox_w1_probe(struct pci_dev *pdev, const struct pci_devi
        if (pdev->vendor != PCI_VENDOR_ID_MATROX || pdev->device != PCI_DEVICE_ID_MATROX_G400)
                return -ENODEV;
 
-       dev = kmalloc(sizeof(struct matrox_device) +
+       dev = kzalloc(sizeof(struct matrox_device) +
                       sizeof(struct w1_bus_master), GFP_KERNEL);
        if (!dev) {
                dev_err(&pdev->dev,
@@ -173,7 +172,6 @@ static int __devinit matrox_w1_probe(struct pci_dev *pdev, const struct pci_devi
                return -ENOMEM;
        }
 
-       memset(dev, 0, sizeof(struct matrox_device) + sizeof(struct w1_bus_master));
 
        dev->bus_master = (struct w1_bus_master *)(dev + 1);
 
@@ -215,6 +213,8 @@ static int __devinit matrox_w1_probe(struct pci_dev *pdev, const struct pci_devi
        return 0;
 
 err_out_free_device:
+       if (dev->virt_addr)
+               iounmap(dev->virt_addr);
        kfree(dev);
 
        return err;