ioat: Remove duplicated devm_kzalloc() calls for ioatdma_device
authorMinskey Guo <chaohong_guo@linux.intel.com>
Sun, 2 May 2010 19:52:35 +0000 (12:52 -0700)
committerDan Williams <dan.j.williams@intel.com>
Sun, 2 May 2010 19:52:35 +0000 (12:52 -0700)
The memory for ioatdma_device structure is being allocated in
alloc_ioatdma()

Signed-off-by: Minskey Guo <chaohong_guo@linux.intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/dma/ioat/pci.c

index 99ec26725bae89699ed758fbee0dd6af9be68582..fab37d1cf48d0bdf9f4476b1758cdc3752cd72f4 100644 (file)
@@ -138,15 +138,10 @@ static int __devinit ioat_pci_probe(struct pci_dev *pdev, const struct pci_devic
        if (err)
                return err;
 
-       device = devm_kzalloc(dev, sizeof(*device), GFP_KERNEL);
-       if (!device)
-               return -ENOMEM;
-
-       pci_set_master(pdev);
-
        device = alloc_ioatdma(pdev, iomap[IOAT_MMIO_BAR]);
        if (!device)
                return -ENOMEM;
+       pci_set_master(pdev);
        pci_set_drvdata(pdev, device);
 
        device->version = readb(device->reg_base + IOAT_VER_OFFSET);