From c293fb785bdda64d88f197e6758a3c16ae83e569 Mon Sep 17 00:00:00 2001 From: Gilles Chanteperdrix Date: Sun, 6 Apr 2014 20:37:44 +0200 Subject: [PATCH] net/at91_ether: avoid NULL pointer dereference The at91_ether driver calls macb_mii_init passing a 'struct macb' structure whose tx_clk member is initialized to 0. However, macb_handle_link_change() expects tx_clk to be the result of a call to clk_get, and so IS_ERR(tx_clk) to be true if the clock is invalid. This causes an oops when booting Linux 3.14 on the csb637 board. The following changes avoids this. Signed-off-by: Gilles Chanteperdrix Acked-by: Nicolas Ferre Signed-off-by: David S. Miller --- Reading git-format-patch failed