From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 3/6] ARM: mx23-evk: Fix result checking of devfs_add_partition
Date: Tue, 1 Oct 2013 08:22:05 +0200 [thread overview]
Message-ID: <1380608528-26999-4-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1380608528-26999-1-git-send-email-s.hauer@pengutronix.de>
devfs_add_partition was changed to return the cdev. Fix the result
checking accordingly.
Signed-off-by: Sascha Hauer <s.hauer@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
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2013-10-01 6:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-01 6:22 Compiler warning fixes Sascha Hauer
2013-10-01 6:22 ` [PATCH 1/6] ARM: edb93xx: Add missing include Sascha Hauer
2013-10-01 6:22 ` [PATCH 2/6] ARM: friendlyarm-tiny210: remove unused variable Sascha Hauer
2013-10-01 6:22 ` Sascha Hauer [this message]
2013-10-01 7:49 ` [PATCH 3/6] ARM: mx23-evk: Fix result checking of devfs_add_partition Uwe Kleine-König
2013-10-02 8:29 ` Sascha Hauer
2013-10-01 6:22 ` [PATCH 4/6] ARM: Ka-Ro TX28: " Sascha Hauer
2013-10-01 6:22 ` [PATCH 5/6] ARM: vexpress: Fix compiler warning Sascha Hauer
2013-10-01 13:22 ` Jean-Christophe PLAGNIOL-VILLARD
2013-10-02 8:27 ` Sascha Hauer
2013-10-01 6:22 ` [PATCH 6/6] mips: bcm47xx: " 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=1380608528-26999-4-git-send-email-s.hauer@pengutronix.de \
--to=s.hauer@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