From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VQtLt-0000SU-0n for barebox@lists.infradead.org; Tue, 01 Oct 2013 06:22:35 +0000 From: Sascha Hauer Date: Tue, 1 Oct 2013 08:22:06 +0200 Message-Id: <1380608528-26999-5-git-send-email-s.hauer@pengutronix.de> In-Reply-To: <1380608528-26999-1-git-send-email-s.hauer@pengutronix.de> References: <1380608528-26999-1-git-send-email-s.hauer@pengutronix.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 4/6] ARM: Ka-Ro TX28: Fix result checking of devfs_add_partition To: barebox@lists.infradead.org devfs_add_partition was changed to return the cdev. Fix the result checking accordingly. Signed-off-by: Sascha Hauer --- arch/arm/boards/karo-tx28/tx28-stk5.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/arm/boards/karo-tx28/tx28-stk5.c b/arch/arm/boards/karo-tx28/tx28-stk5.c index 2984d10..57cb0c3 100644 --- a/arch/arm/boards/karo-tx28/tx28-stk5.c +++ b/arch/arm/boards/karo-tx28/tx28-stk5.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -344,8 +345,11 @@ static int register_persistent_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; } void tx28_get_ethaddr(void) -- 1.8.4.rc3 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox