Skip to content

Commit f36dbe6

Browse files
andy-shevdavem330
authored andcommitted
net/macb: check if macb_config present
The commit 98b5a0f introduces jumbo frame support, but also it assumes that macb_config present which is not always true. The configuration without macb_config fails to boot. Unable to handle kernel NULL pointer dereference at virtual address 00000010 ptbr = 90350000 pgd = 00000000 Oops: Kernel access of bad area, sig: 11 [#1] FRAME_POINTER chip: 0x01f:0x1e82 rev 2 Modules linked in: CPU: 0 PID: 1 Comm: swapper Not tainted 4.2.0-rc3-next-20150723+ #13 task: 91c26000 ti: 91c28000 task.ti: 91c28000 PC is at macb_probe+0x140/0x61c Fixes: 98b5a0f (net: macb: Add support for jumbo frames) Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent f2ce8a9 commit f36dbe6

File tree

1 file changed

+1
-2
lines changed
  • drivers/net/ethernet/cadence

1 file changed

+1
-2
lines changed

drivers/net/ethernet/cadence/macb.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -2887,9 +2887,8 @@ static int macb_probe(struct platform_device *pdev)
28872887
bp->pclk = pclk;
28882888
bp->hclk = hclk;
28892889
bp->tx_clk = tx_clk;
2890-
if (macb_config->jumbo_max_len) {
2890+
if (macb_config)
28912891
bp->jumbo_max_len = macb_config->jumbo_max_len;
2892-
}
28932892

28942893
spin_lock_init(&bp->lock);
28952894

0 commit comments

Comments
 (0)