sh_eth: check platform data pointer
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Wed, 30 Oct 2013 20:30:19 +0000 (23:30 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 Nov 2013 20:49:28 +0000 (15:49 -0500)
commit3b4c5cbf42bda976ab70354e7786a0808265d9d5
treeee60ea2b60d9dfb382f509722c6564d51d920958
parent6f9fed0bd2f82bafe1d8ab200916d9bd55b36c66
sh_eth: check platform data pointer

Check the platform data pointer before dereferencing it and error out of the
probe() method if it's NULL.

This has additional effect of preventing kernel oops with outdated platform data
containing zero PHY address instead (such as on SolutionEngine7710).

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/renesas/sh_eth.c