mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 3/5] ARM: layerscape: ppa: fix wrong return values on some errors
Date: Thu,  1 Oct 2020 09:43:35 +0200	[thread overview]
Message-ID: <20201001074337.23430-3-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20201001074337.23430-1-a.fatoum@pengutronix.de>

Coccinelle detected that the IS_ERR and ERR_PTR are mismatched.
Fix it.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 arch/arm/mach-layerscape/ppa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-layerscape/ppa.c b/arch/arm/mach-layerscape/ppa.c
index f38220dbc1e7..53e73f6a581f 100644
--- a/arch/arm/mach-layerscape/ppa.c
+++ b/arch/arm/mach-layerscape/ppa.c
@@ -76,7 +76,7 @@ static int ppa_init(void *ppa, size_t ppa_size, void *sec_firmware_addr)
 	conf = fit_open_configuration(fit, NULL);
 	if (IS_ERR(conf)) {
 		pr_err("Cannot open default config in ppa FIT image: %pe\n", conf);
-		ret = PTR_ERR(fit);
+		ret = PTR_ERR(conf);
 		goto err;
 	}
 
-- 
2.28.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2020-10-01  7:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-01  7:43 [PATCH 1/5] treewide: fix unterminated of_device_id[] reported by Coccinelle Ahmad Fatoum
2020-10-01  7:43 ` [PATCH 2/5] scripts: kwboot: allow piping full buffer size at once Ahmad Fatoum
2020-10-01  7:43 ` Ahmad Fatoum [this message]
2020-10-01  7:43 ` [PATCH 4/5] net: macb: fix wrong return values on some errors Ahmad Fatoum
2020-10-01  7:43 ` [PATCH 5/5] scripts: kwbimage: " Ahmad Fatoum
2020-10-02  4:31 ` [PATCH 1/5] treewide: fix unterminated of_device_id[] reported by Coccinelle Sascha Hauer

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=20201001074337.23430-3-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.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