* [PATCH] gwdpa: gswip: fix odd_ptr_err.cocci warnings
@ 2020-02-20 14:43 Julia Lawall
0 siblings, 0 replies; only message in thread
From: Julia Lawall @ 2020-02-20 14:43 UTC (permalink / raw)
To: Jack Ping CHNG
Cc: Jeff Kirsher, Amireddy Mallikarjuna reddy, intel-wired-lan,
netdev, linux-kernel, kbuild-all
From: kbuild test robot <lkp@intel.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@linux.intel.com>
Signed-off-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.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++;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-02-20 14:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-20 14:43 [PATCH] gwdpa: gswip: fix odd_ptr_err.cocci warnings Julia Lawall
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).