From b8bc0421ab7f83712a0a8ef7eb05fa73ec53c027 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Tue, 27 Jul 2010 00:05:56 +0000 Subject: ixgbe: potential null dereference The e_dev_err() macro dereferences "adapter" which is NULL here. Signed-off-by: Dan Carpenter Acked-by: Jeff Kirsher Signed-off-by: David S. Miller --- drivers/net/ixgbe/ixgbe_main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index bc22ab4336b..e92acbf5a30 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c @@ -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; } } @@ -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; } -- cgit v1.2.3-18-g5258