1 From: Yang Yingliang <yangyingliang@huawei.com>
2 Date: Fri, 8 Apr 2022 11:22:46 +0800
3 Subject: [PATCH] net: ethernet: mtk_eth_soc: fix return value check in
6 If syscon_regmap_lookup_by_phandle() fails, it never return NULL pointer,
7 change the check to IS_ERR().
9 Fixes: 804775dfc288 ("net: ethernet: mtk_eth_soc: add support for Wireless Ethernet Dispatch (WED)")
10 Reported-by: Hulk Robot <hulkci@huawei.com>
11 Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
12 Signed-off-by: David S. Miller <davem@davemloft.net>
15 --- a/drivers/net/ethernet/mediatek/mtk_wed.c
16 +++ b/drivers/net/ethernet/mediatek/mtk_wed.c
17 @@ -816,7 +816,7 @@ void mtk_wed_add_hw(struct device_node *
20 regs = syscon_regmap_lookup_by_phandle(np, NULL);
25 rcu_assign_pointer(mtk_soc_wed_ops, &wed_ops);