[PATCH 3/6] ARM: mx23-evk: Fix result checking of devfs_add_partition
Sascha Hauer
s.hauer at pengutronix.de
Tue Oct 1 02:22:05 EDT 2013
devfs_add_partition was changed to return the cdev. Fix the result
checking accordingly.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
arch/arm/boards/freescale-mx23-evk/mx23-evk.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boards/freescale-mx23-evk/mx23-evk.c b/arch/arm/boards/freescale-mx23-evk/mx23-evk.c
index 1714fdd..9ba32d3 100644
--- a/arch/arm/boards/freescale-mx23-evk/mx23-evk.c
+++ b/arch/arm/boards/freescale-mx23-evk/mx23-evk.c
@@ -19,6 +19,7 @@
#include <gpio.h>
#include <environment.h>
#include <mci.h>
+#include <linux/err.h>
#include <asm/armlinux.h>
#include <generated/mach-types.h>
#include <mach/imx-regs.h>
@@ -95,8 +96,11 @@ static int register_persistant_environment(void)
}
/* use the full partition as our persistent environment storage */
- return devfs_add_partition("disk0.1", 0, cdev->size,
+ cdev = devfs_add_partition("disk0.1", 0, cdev->size,
DEVFS_PARTITION_FIXED, "env0");
+ if (IS_ERR(cdev))
+ return PTR_ERR(cdev);
+ return 0;
}
static int mx23_evk_devices_init(void)
--
1.8.4.rc3
More information about the barebox
mailing list