Commit ec3f06b5 authored by Zheng Yongjun's avatar Zheng Yongjun Committed by David S. Miller

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: 976de6a8 ("fs_enet: Be an of_platform device when CONFIG_PPC_CPM_NEW_BINDING is set.")
Signed-off-by: default avatarZheng Yongjun <zhengyongjun3@huawei.com>
Reviewed-by: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a292c256
...@@ -98,7 +98,7 @@ static int do_pd_setup(struct fs_enet_private *fep) ...@@ -98,7 +98,7 @@ static int do_pd_setup(struct fs_enet_private *fep)
return -EINVAL; return -EINVAL;
fep->fec.fecp = of_iomap(ofdev->dev.of_node, 0); fep->fec.fecp = of_iomap(ofdev->dev.of_node, 0);
if (!fep->fcc.fccp) if (!fep->fec.fecp)
return -EINVAL; return -EINVAL;
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment