DENG Qingfang 764cc5c6a6 generic: mt7530: fix null pointer dereferencing in port5 setup
The 2nd gmac of mediatek soc ethernet may not be connected to a PHY
and a phy-handle isn't always available.
Unfortunately, mt7530 dsa driver assumes that the 2nd gmac is always
connected to switch port 5 and setup mt7530 according to phy address
of 2nd gmac node, causing null pointer dereferencing when phy-handle
isn't defined in dts.
This commit fix this setup code by checking return value of
of_parse_phandle before using it.

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
2020-04-04 14:56:14 +08:00
..
2020-03-28 13:03:02 +01:00
2020-03-21 18:17:04 +01:00
2020-03-28 13:03:02 +01:00
2020-03-28 13:03:02 +01:00
2020-03-12 09:28:23 +01:00
2020-03-28 13:03:02 +01:00
2020-04-03 12:17:45 +02:00
2020-03-28 13:03:02 +01:00
2020-03-28 22:58:36 +01:00
2020-03-31 16:20:47 +02:00
2020-03-17 00:51:48 +01:00