[<prev] [next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.2002201541470.2210@hadrien>
Date: Thu, 20 Feb 2020 15:43:40 +0100 (CET)
From: Julia Lawall <julia.lawall@...ia.fr>
To: Jack Ping CHNG <jack.ping.chng@...ux.intel.com>
cc: Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
Amireddy Mallikarjuna reddy
<mallikarjunax.reddy@...ux.intel.com>,
intel-wired-lan@...ts.osuosl.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, kbuild-all@...ts.01.org
Subject: [PATCH] gwdpa: gswip: fix odd_ptr_err.cocci warnings
From: kbuild test robot <lkp@...el.com>
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 <jack.ping.chng@...ux.intel.com>
Signed-off-by: kbuild test robot <lkp@...el.com>
Signed-off-by: Julia Lawall <julia.lawall@...ia.fr>
---
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(-)
--- a/drivers/net/ethernet/intel/gwdpa/gswip/gswip_dev.c
+++ b/drivers/net/ethernet/intel/gwdpa/gswip/gswip_dev.c
@@ -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++;
Powered by blists - more mailing lists