[PATCH 3/5] ARM: layerscape: ppa: fix wrong return values on some errors

Ahmad Fatoum a.fatoum at pengutronix.de
Thu Oct 1 03:43:35 EDT 2020


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

Signed-off-by: Ahmad Fatoum <a.fatoum at 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




More information about the barebox mailing list