* [PATCH] ARM: omap: Fix error printing
@ 2017-06-27 11:03 Sascha Hauer
0 siblings, 0 replies; only message in thread
From: Sascha Hauer @ 2017-06-27 11:03 UTC (permalink / raw)
To: Barebox List
Presumably the code wanted to print the error with the %d format
specifier. Actually pass the error code by using PTR_ERR() and not
IS_ERR(). While at it use %ld to print a unsigned long variable to
get rid of a compiler warning.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/mach-omap/omap_generic.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap/omap_generic.c b/arch/arm/mach-omap/omap_generic.c
index 694c951037..a1c0aeb595 100644
--- a/arch/arm/mach-omap/omap_generic.c
+++ b/arch/arm/mach-omap/omap_generic.c
@@ -141,8 +141,8 @@ static int omap_env_init(void)
rootpath = cdev_mount_default(cdev, NULL);
if (IS_ERR(rootpath)) {
- pr_err("Failed to load environment: mount %s failed (%d)\n",
- cdev->name, IS_ERR(rootpath));
+ pr_err("Failed to load environment: mount %s failed (%ld)\n",
+ cdev->name, PTR_ERR(rootpath));
goto out;
}
ret = symlink(rootpath, "/boot");
--
2.11.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-06-27 11:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-27 11:03 [PATCH] ARM: omap: Fix error printing Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox