All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [PATCH] PM / devfreq: fix odd_ptr_err.cocci warnings
Date: Mon, 01 Mar 2021 16:35:52 +0800	[thread overview]
Message-ID: <20210301083552.GA13422@c3012bc6eae4> (raw)
In-Reply-To: <202103011646.As86pQFY-lkp@intel.com>

[-- Attachment #1: Type: text/plain, Size: 1769 bytes --]

CC: kbuild-all(a)lists.01.org
TO: Saravana Kannan <skannan@codeaurora.org>
CC: Chanwoo Choi <cw00.choi@samsung.com>
CC: Sibi Sankar <sibis@codeaurora.org>
CC: MyungJoo Ham <myungjoo.ham@samsung.com>
CC: Kyungmin Park <kyungmin.park@samsung.com>
CC: linux-pm(a)vger.kernel.org
CC: linux-kernel(a)vger.kernel.org

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

drivers/devfreq/governor_passive.c:318:7-13: inconsistent IS_ERR and PTR_ERR on line 319.

 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

Fixes: 82d4ff586ae2 ("PM / devfreq: Add cpu based scaling support to passive governor")
CC: Saravana Kannan <skannan@codeaurora.org>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git devfreq-testing-passive-gov
head:   82d4ff586ae2fb6d89cad871949004bed3438ccb
commit: 82d4ff586ae2fb6d89cad871949004bed3438ccb [3/3] PM / devfreq: Add cpu based scaling support to passive governor
:::::: branch date: 3 hours ago
:::::: commit date: 3 hours ago

Please take the patch only if it's a positive warning. Thanks!

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

--- a/drivers/devfreq/governor_passive.c
+++ b/drivers/devfreq/governor_passive.c
@@ -316,7 +316,7 @@ static int cpufreq_passive_register(stru
 
 			opp_table = dev_pm_opp_get_opp_table(cpu_dev);
 			if (IS_ERR(devfreq->opp_table)) {
-				ret = PTR_ERR(opp_table);
+				ret = PTR_ERR(devfreq->opp_table);
 				goto out;
 			}
 

  reply	other threads:[~2021-03-01  8:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-01  8:35 [chanwoo:devfreq-testing-passive-gov 3/3] drivers/devfreq/governor_passive.c:318:7-13: inconsistent IS_ERR and PTR_ERR on line 319 kernel test robot
2021-03-01  8:35 ` kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-05-21 16:09 [PATCH 06/12] PM / devfreq: Add cpu based scaling support to passive_governor kbuild test robot
2020-05-21 16:09 ` [PATCH] PM / devfreq: fix odd_ptr_err.cocci warnings kbuild test robot
2020-05-22 12:59   ` Julia Lawall
2020-05-22 12:59     ` Julia Lawall
2020-05-22 12:59     ` Julia Lawall
2020-05-22 12:59     ` Julia Lawall

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=20210301083552.GA13422@c3012bc6eae4 \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.