Skip to content

Commit

Permalink
ioat: Remove duplicated devm_kzalloc() calls for ioatdma_device
Browse files Browse the repository at this point in the history
The memory for ioatdma_device structure is being allocated in
alloc_ioatdma()

Signed-off-by: Minskey Guo <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
  • Loading branch information
Minskey Guo authored and djbw committed May 2, 2010
1 parent 2adfc55 commit c86e140
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions drivers/dma/ioat/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c86e140

Please sign in to comment.