Skip to content

Commit

Permalink
net: fs_enet: Fix wrong check in do_pd_setup
Browse files Browse the repository at this point in the history
[ Upstream commit ec3f06b ]

Should check of_iomap return value 'fep->fec.fecp' instead of 'fep->fcc.fccp'

Fixes: 976de6a ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Zheng Yongjun authored and gregkh committed Oct 21, 2022
1 parent 220fdee commit 0f8bc88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/freescale/fs_enet/mac-fec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0f8bc88

Please sign in to comment.