netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@inria.fr>
To: Jack Ping CHNG <jack.ping.chng@linux.intel.com>
Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>,
	Amireddy Mallikarjuna reddy 
	<mallikarjunax.reddy@linux.intel.com>,
	intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, kbuild-all@lists.01.org
Subject: [PATCH] gwdpa: gswip: fix odd_ptr_err.cocci warnings
Date: Thu, 20 Feb 2020 15:43:40 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.21.2002201541470.2210@hadrien> (raw)

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++;

                 reply	other threads:[~2020-02-20 14:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.21.2002201541470.2210@hadrien \
    --to=julia.lawall@inria.fr \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jack.ping.chng@linux.intel.com \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mallikarjunax.reddy@linux.intel.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).