[PATCH v3 01/16] i.MX: HABv4: ignore return for i.MX28/6 initcalls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Move the status call below the explanations and return Null.
No functional changes intended.

Signed-off-by: Rouven Czerwinski <r.czerwinski@xxxxxxxxxxxxxx>
---
 drivers/hab/habv4.c | 18 +++++-------------
 1 file changed, 5 insertions(+), 13 deletions(-)

diff --git a/drivers/hab/habv4.c b/drivers/hab/habv4.c
index 6a60be6..b11cf7b 100644
--- a/drivers/hab/habv4.c
+++ b/drivers/hab/habv4.c
@@ -511,21 +511,17 @@ int imx6_hab_get_status(void)
 
 static int init_imx6_hab_get_status(void)
 {
-	int ret = 0;
-
 	if (!cpu_is_mx6())
 		/* can happen in multi-image builds and is not an error */
 		return 0;
 
-	ret = imx6_hab_get_status();
-
 	/*
 	 * Nobody will check the return value if there were HAB errors, but the
 	 * initcall will fail spectaculously with a strange error message.
 	 */
-	if (ret == -EPERM)
-		return 0;
-	return ret;
+	imx6_hab_get_status();
+
+	return 0;
 }
 
 /*
@@ -544,19 +540,15 @@ int imx28_hab_get_status(void)
 
 static int init_imx28_hab_get_status(void)
 {
-	int ret = 0;
-
 	if (!cpu_is_mx28())
 		/* can happen in multi-image builds and is not an error */
 		return 0;
 
-	ret = imx28_hab_get_status();
 
 	/* nobody will check the return value if there were HAB errors, but the
 	 * initcall will fail spectaculously with a strange error message. */
-	if (ret == -EPERM)
-		return 0;
-	return ret;
+	imx28_hab_get_status();
+	return 0;
 }
 /* i.MX28 ROM code can be run after MMU setup to make use of caching */
 postmmu_initcall(init_imx28_hab_get_status);
-- 
git-series 0.9.1

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux