gwdpa: gswip: fix odd_ptr_err.cocci warnings
Subsystems (3)
PATCH 1/1 gwdpa: gswip: fix odd_ptr_err.cocci warnings
From: kbuild test robot <[email protected]>
PTR_ERR should typically access the value just tested by IS_ERR
Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci
Fixes 69fab0a67a95 ("gwdpa: gswip: Introduce Gigabit Ethernet Switch (GSWIP) device driver")
CC Jack Ping CHNG <[email protected]>
Signed-off-by kbuild test robot <[email protected]>
Signed-off-by Julia Lawall <[email protected]>
---
Maybe the code is correct, but just unnecessarily obscure.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git dev-queue head: 7a6fc7fc71cf6316739b60fcffdb86e0c43f99b5 commit: 69fab0a67a95208a25af95de20a0301298ee23f6 [43/47] gwdpa: gswip: Introduce Gigabit Ethernet Switch (GSWIP) device driver
:::::: branch date: 9 hours ago
:::::: commit date: 9 hours ago
gswip_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/gwdpa/gswip/gswip_dev.c +1 -1
@@ -96,7 +96,7 @@ static int np_gswip_parse_dt(struct plat pdata->sw_clk =devm_clk_get (dev,"switch" );if (IS_ERR (pdata->sw_clk)) -return PTR_ERR (priv->pdata.sw_clk); +return PTR_ERR (pdata->sw_clk);for_each_node_by_name (node,GSWIP_MAC_DEV_NAME ) { priv->num_subdev_mac++;