linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr>
To: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: kbuild-all@01.org, Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.com>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: [PATCH] fix odd_ptr_err.cocci warnings
Date: Fri, 9 Aug 2019 12:30:46 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.21.1908091229140.2946@hadrien> (raw)

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

 PTR_ERR should normally access the value just tested by IS_ERR

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

Fixes: 62c9c1442c8f ("j721e new machine driver wip")
Signed-off-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
---

tree:   https://github.com/omap-audio/linux-audio peter/ti-linux-4.19.y/wip
head:   62c9c1442c8f61ca93e62e1a9d8318be0abd9d9a
commit: 62c9c1442c8f61ca93e62e1a9d8318be0abd9d9a [34/34] j721e new machine driver wip
:::::: branch date: 20 hours ago
:::::: commit date: 20 hours ago

 j721e-evm.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/sound/soc/ti/j721e-evm.c
+++ b/sound/soc/ti/j721e-evm.c
@@ -283,7 +283,7 @@ static int j721e_get_clocks(struct platf
 		parent = devm_clk_get(&pdev->dev, clk_name);
 		kfree(clk_name);
 		if (IS_ERR(parent)) {
-			ret = PTR_ERR(clocks->parent);
+			ret = PTR_ERR(parent);
 			if (ret != -EPROBE_DEFER)
 				dev_err(&pdev->dev, "failed to acquire %s': %d\n",
 					prefix, ret);
@@ -299,7 +299,7 @@ static int j721e_get_clocks(struct platf
 		parent = devm_clk_get(&pdev->dev, clk_name);
 		kfree(clk_name);
 		if (IS_ERR(parent)) {
-			ret = PTR_ERR(clocks->parent);
+			ret = PTR_ERR(parent);
 			if (ret != -EPROBE_DEFER)
 				dev_err(&pdev->dev, "failed to acquire %s': %d\n",
 					prefix, ret);

             reply	other threads:[~2019-08-09 10:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-09 10:30 Julia Lawall [this message]
2019-08-09 12:31 ` [PATCH] fix odd_ptr_err.cocci warnings Mark Brown
2019-08-09 13:14   ` Peter Ujfalusi
2019-08-09 13:21     ` Julia Lawall
2019-08-20  8:41       ` [kbuild-all] " Rong Chen
2019-08-20 10:54         ` Peter Ujfalusi

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.1908091229140.2946@hadrien \
    --to=julia.lawall@lip6.fr \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=kbuild-all@01.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=peter.ujfalusi@ti.com \
    --cc=tiwai@suse.com \
    /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).