diff options
author | Zheng Yongjun <zhengyongjun3@huawei.com> | 2022-09-08 16:55:13 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-09-16 14:13:00 +0300 |
commit | ec3f06b542a960806a81345042e4eee3f8c5dec4 (patch) | |
tree | d411c32eb7b924ea618cd46695a7b5a75997bca9 /drivers/net/ethernet/freescale/fs_enet/mac-fec.c | |
parent | a292c25607ea3f259afb318f03e05b84108348bf (diff) | |
download | linux-ec3f06b542a960806a81345042e4eee3f8c5dec4.tar.xz |
net: fs_enet: Fix wrong check in do_pd_setup
Should check of_iomap return value 'fep->fec.fecp' instead of 'fep->fcc.fccp'
Fixes: 976de6a8c304 ("fs_enet: Be an of_platform device when CONFIG_PPC_CPM_NEW_BINDING is set.")
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/freescale/fs_enet/mac-fec.c')
-rw-r--r-- | drivers/net/ethernet/freescale/fs_enet/mac-fec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/fs_enet/mac-fec.c b/drivers/net/ethernet/freescale/fs_enet/mac-fec.c index 99fe2c210d0f..61f4b6e50d29 100644 --- a/drivers/net/ethernet/freescale/fs_enet/mac-fec.c +++ b/drivers/net/ethernet/freescale/fs_enet/mac-fec.c @@ -98,7 +98,7 @@ static int do_pd_setup(struct fs_enet_private *fep) return -EINVAL; fep->fec.fecp = of_iomap(ofdev->dev.of_node, 0); - if (!fep->fcc.fccp) + if (!fep->fec.fecp) return -EINVAL; return 0; |