]> git.baikalelectronics.ru Git - kernel.git/commit
net: dwmac-sun8i: fix a missing check of of_get_phy_mode
authorKangjie Lu <kjlu@umn.edu>
Tue, 12 Mar 2019 07:50:40 +0000 (02:50 -0500)
committerDavid S. Miller <davem@davemloft.net>
Tue, 12 Mar 2019 21:52:00 +0000 (14:52 -0700)
commit216cda5c0417e5d156655112461d8d27aef17c1d
tree25d09ed2f4437df2ad9d09977884275678e8af7a
parente355e8d19e4b39a54e2af26b5045d8feb925cf16
net: dwmac-sun8i: fix a missing check of of_get_phy_mode

of_get_phy_mode may fail and return a negative error code;
the fix checks the return value of of_get_phy_mode and
returns -EINVAL of it fails.

Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c