[PATCH] ARM: omap: Fix error printing
Sascha Hauer
s.hauer at pengutronix.de
Tue Jun 27 04:03:55 PDT 2017
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 at 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
More information about the barebox
mailing list