From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============4072439760812365302==" MIME-Version: 1.0 From: kernel test robot Subject: [PATCH] PM / devfreq: fix odd_ptr_err.cocci warnings Date: Mon, 01 Mar 2021 16:35:52 +0800 Message-ID: <20210301083552.GA13422@c3012bc6eae4> In-Reply-To: <202103011646.As86pQFY-lkp@intel.com> List-Id: To: kbuild@lists.01.org --===============4072439760812365302== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable CC: kbuild-all(a)lists.01.org TO: Saravana Kannan CC: Chanwoo Choi CC: Sibi Sankar CC: MyungJoo Ham CC: Kyungmin Park CC: linux-pm(a)vger.kernel.org CC: linux-kernel(a)vger.kernel.org From: kernel test robot drivers/devfreq/governor_passive.c:318:7-13: inconsistent IS_ERR and PTR_ER= R 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 passiv= e governor") CC: Saravana Kannan Reported-by: kernel test robot Signed-off-by: kernel test robot --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git d= evfreq-testing-passive-gov head: 82d4ff586ae2fb6d89cad871949004bed3438ccb commit: 82d4ff586ae2fb6d89cad871949004bed3438ccb [3/3] PM / devfreq: Add cp= u 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 =3D dev_pm_opp_get_opp_table(cpu_dev); if (IS_ERR(devfreq->opp_table)) { - ret =3D PTR_ERR(opp_table); + ret =3D PTR_ERR(devfreq->opp_table); goto out; } =20 --===============4072439760812365302==--