diff options
author | Kangjie Lu <kjlu@umn.edu> | 2019-03-12 02:43:18 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-03-12 14:51:02 -0700 |
commit | 035a14e71f27eefa50087963b94cbdb3580d08bf (patch) | |
tree | 7c8b035774a447e08c8e8699bec9b071383117f9 /drivers/net/ethernet/socionext | |
parent | net: 8390: fix potential NULL pointer dereferences (diff) | |
download | linux-dev-035a14e71f27eefa50087963b94cbdb3580d08bf.tar.xz linux-dev-035a14e71f27eefa50087963b94cbdb3580d08bf.zip |
net: sh_eth: 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 NULL of it fails.
Fixes: b356e978e92f ("sh_eth: add device tree support")
Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Reviewed-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/socionext')
0 files changed, 0 insertions, 0 deletions