Skip to contentSkip to conversation

powerpc: Fix error return in rtas_flash module init

PATCH New Anton Blanchard 1 participant 1 message Apr 14, 2014 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc: Fix error return in rtas_flash module init

module_init should return 0 or a negative errno.

---

arch/powerpc/kernel/rtas_flash.c +1 -1
index 2f3cdb0..658e89d 100644
@@ -705,7 +705,7 @@ static int __init rtas_flash_init(void)
 	if (rtas_token("ibm,update-flash-64-and-reboot") ==
 		       RTAS_UNKNOWN_SERVICE) {
 		pr_info("rtas_flash: no firmware flash support\n");
-		return 1;
+		return -EINVAL;
 	}
 
 	rtas_validate_flash_data.buf = kzalloc(VALIDATE_BUF_SIZE, GFP_KERNEL);