]> git.baikalelectronics.ru Git - kernel.git/commit
pxa168_eth: fix mdiobus_scan() error check
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Sat, 30 Apr 2016 20:35:11 +0000 (23:35 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 3 May 2016 19:03:08 +0000 (15:03 -0400)
commit482b7e6284d2e7e4a65a92adda7ef2598ae03d03
tree5f634dc6db27e8ab1e466d3217097928a35f6869
parentfe0016c0978a1f770b2fb97afb625717f9507b9d
pxa168_eth: fix mdiobus_scan() error check

Since mdiobus_scan() returns either an error code or NULL on error, the
driver should check  for both,  not only for NULL, otherwise a crash is
imminent...

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/pxa168_eth.c