Linux-PM Archive on
 help / color / Atom feed
From: Julia Lawall <>
To: Saravana Kannan <>
Cc: Chanwoo Choi <>,
	Sibi Sankar <>,
	MyungJoo Ham <>,
	Kyungmin Park <>,,,
Subject: [PATCH] PM / devfreq: fix odd_ptr_err.cocci warnings (fwd)
Date: Mon, 1 Mar 2021 15:55:23 +0100 (CET)
Message-ID: <alpine.DEB.2.22.394.2103011553490.2899@hadrien> (raw)


There seems to be an inconsistency, but the patch proposed by Coccinelle
does not look correct.  There should be a test on opp_table.


---------- Forwarded message ----------
Date: Mon, 1 Mar 2021 16:35:52 +0800
From: kernel test robot <>
Cc:, Julia Lawall <>
Subject: [PATCH] PM / devfreq: fix odd_ptr_err.cocci warnings

TO: Saravana Kannan <>
CC: Chanwoo Choi <>
CC: Sibi Sankar <>
CC: MyungJoo Ham <>
CC: Kyungmin Park <>

From: kernel test robot <>

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 <>
Reported-by: kernel test robot <>
Signed-off-by: kernel test robot <>

tree: 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 index

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:

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

  git send-email \
    --in-reply-to=alpine.DEB.2.22.394.2103011553490.2899@hadrien \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-PM Archive on

Archives are clonable:
	git clone --mirror linux-pm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-pm linux-pm/ \
	public-inbox-index linux-pm

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone