linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Loic Poulain <loic.poulain@linaro.org>,
	gregkh@linuxfoundation.org, kuba@kernel.org, davem@davemloft.net
Cc: kbuild-all@lists.01.org, linux-arm-msm@vger.kernel.org,
	aleksander@aleksander.es, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org, bjorn.andersson@linaro.org,
	manivannan.sadhasivam@linaro.org,
	Loic Poulain <loic.poulain@linaro.org>
Subject: [PATCH] net: fix odd_ptr_err.cocci warnings
Date: Mon, 5 Apr 2021 21:12:23 +0800	[thread overview]
Message-ID: <20210405131223.GA21985@2ab4936ad957> (raw)
In-Reply-To: <1617616369-27305-2-git-send-email-loic.poulain@linaro.org>

From: kernel test robot <lkp@intel.com>

drivers/net/wwan/mhi_wwan_ctrl.c:239:5-11: inconsistent IS_ERR and PTR_ERR on line 241.

 PTR_ERR should access the value just tested by IS_ERR

Semantic patch information:
 There can be false positives in the patch case, where it is the call to
 IS_ERR that is wrong.

Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci

CC: Loic Poulain <loic.poulain@linaro.org>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

url:    https://github.com/0day-ci/linux/commits/Loic-Poulain/net-Add-a-WWAN-subsystem/20210405-174547
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 7d42e84eb99daf9b7feef37e8f2ea1eaf975346b

 mhi_wwan_ctrl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/wwan/mhi_wwan_ctrl.c
+++ b/drivers/net/wwan/mhi_wwan_ctrl.c
@@ -238,7 +238,7 @@ static int mhi_wwan_ctrl_probe(struct mh
 				&wwan_pops, mhiwwan);
 	if (IS_ERR(mhiwwan->wwan_port)) {
 		kfree(mhiwwan);
-		return PTR_ERR(port);
+		return PTR_ERR(mhiwwan->wwan_port);
 	}
 
 	mhiwwan->wwan_port = port;

  parent reply	other threads:[~2021-04-05 13:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-05  9:52 [PATCH net-next v9 1/2] net: Add a WWAN subsystem Loic Poulain
2021-04-05  9:52 ` [PATCH net-next v9 2/2] net: Add Qcom WWAN control driver Loic Poulain
2021-04-05 10:30   ` Loic Poulain
2021-04-05 13:12   ` kernel test robot [this message]
2021-04-07 14:32 ` [PATCH net-next v9 1/2] net: Add a WWAN subsystem Dan Williams
2021-04-08  8:56   ` Loic Poulain
2021-04-08 20:05     ` Aleksander Morgado

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=20210405131223.GA21985@2ab4936ad957 \
    --to=lkp@intel.com \
    --cc=aleksander@aleksander.es \
    --cc=bjorn.andersson@linaro.org \
    --cc=davem@davemloft.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=kbuild-all@lists.01.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loic.poulain@linaro.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --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).