]> git.dujemihanovic.xyz Git - u-boot.git/commit
net: Fix static checker warnings
authorVenkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Thu, 29 Sep 2022 04:56:05 +0000 (10:26 +0530)
committerMichal Simek <michal.simek@amd.com>
Wed, 5 Oct 2022 09:36:54 +0000 (11:36 +0200)
commit9a082d2548de523c37f035cee7e0c280bad62bee
tree3db8ae16d13f07066182fd11ebfe6f74f0a694cf
parente1a193b95177fb5325c07fa85810f640a8ed8687
net: Fix static checker warnings

Here are the smatch warning messages:

drivers/net/xilinx_axi_emac.c:324 axiemac_phy_init()
error: 'phydev' dereferencing possible ERR_PTR()

drivers/net/zynq_gem.c:340 zynq_phy_init()
error: 'priv->phydev' dereferencing possible ERR_PTR()

Fix by adding error checking before dereferencing the pointer.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Link: https://lore.kernel.org/r/20220929045605.23964-1-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
drivers/net/xilinx_axi_emac.c
drivers/net/zynq_gem.c