ramips: 5.4: handle ERR_PTR properly
authorSungbo Eo <mans0n@gorani.run>
Sat, 25 Apr 2020 08:35:53 +0000 (17:35 +0900)
committerChuanhong Guo <gch981213@gmail.com>
Tue, 19 May 2020 11:03:07 +0000 (19:03 +0800)
commitf7112a180f3655c56fb2c31eff286ee98983ca45
tree2e53042c590991874603fc96438eb9a0749fb9c8
parent0a05d71f6f34d2e9101fa40e9643d4f7bc8e7501
ramips: 5.4: handle ERR_PTR properly

of_get_mac_address can return ERR_PTR since 5.2, so the return pointer should be
checked before used. Otherwise it might cause an oops during boot.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c