Skip to content

Commit

Permalink
ixgbe: potential null dereference
Browse files Browse the repository at this point in the history
The e_dev_err() macro dereferences "adapter" which is NULL here.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Jul 28, 2010
1 parent 94fe8c6 commit b8bc042
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/net/ixgbe/ixgbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -6552,8 +6552,8 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
err = dma_set_coherent_mask(&pdev->dev,
DMA_BIT_MASK(32));
if (err) {
e_dev_err("No usable DMA configuration, "
"aborting\n");
dev_err(&pdev->dev,
"No usable DMA configuration, aborting\n");
goto err_dma;
}
}
Expand All @@ -6563,7 +6563,8 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
err = pci_request_selected_regions(pdev, pci_select_bars(pdev,
IORESOURCE_MEM), ixgbe_driver_name);
if (err) {
e_dev_err("pci_request_selected_regions failed 0x%x\n", err);
dev_err(&pdev->dev,
"pci_request_selected_regions failed 0x%x\n", err);
goto err_pci_reg;
}

Expand Down

0 comments on commit b8bc042

Please sign in to comment.