Эх сурвалжийг харах

drivers/sbus/char/envctrl.c: ignore orderly_poweroff return value

orderly_poweroff() unconditionally returns 0, so remove the dead code that
checks the return value.

A future patch will change the return type to void.

Signed-off-by: Joel Stanley <joel@jms.id.au>
Acked-by: David S. Miller <davem@davemloft.net>
Cc: Fabian Frederick <fabf@skynet.be>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Joel Stanley 10 жил өмнө
parent
commit
7975a9b732

+ 1 - 2
drivers/sbus/char/bbc_envctrl.c

@@ -160,8 +160,7 @@ static void do_envctrl_shutdown(struct bbc_cpu_temperature *tp)
 	printk(KERN_CRIT "kenvctrld: Shutting down the system now.\n");
 	printk(KERN_CRIT "kenvctrld: Shutting down the system now.\n");
 
 
 	shutting_down = 1;
 	shutting_down = 1;
-	if (orderly_poweroff(true) < 0)
-		printk(KERN_CRIT "envctrl: shutdown execution failed\n");
+	orderly_poweroff(true);
 }
 }
 
 
 #define WARN_INTERVAL	(30 * HZ)
 #define WARN_INTERVAL	(30 * HZ)

+ 1 - 6
drivers/sbus/char/envctrl.c

@@ -970,18 +970,13 @@ static struct i2c_child_t *envctrl_get_i2c_child(unsigned char mon_type)
 static void envctrl_do_shutdown(void)
 static void envctrl_do_shutdown(void)
 {
 {
 	static int inprog = 0;
 	static int inprog = 0;
-	int ret;
 
 
 	if (inprog != 0)
 	if (inprog != 0)
 		return;
 		return;
 
 
 	inprog = 1;
 	inprog = 1;
 	printk(KERN_CRIT "kenvctrld: WARNING: Shutting down the system now.\n");
 	printk(KERN_CRIT "kenvctrld: WARNING: Shutting down the system now.\n");
-	ret = orderly_poweroff(true);
-	if (ret < 0) {
-		printk(KERN_CRIT "kenvctrld: WARNING: system shutdown failed!\n"); 
-		inprog = 0;  /* unlikely to succeed, but we could try again */
-	}
+	orderly_poweroff(true);
 }
 }
 
 
 static struct task_struct *kenvctrld_task;
 static struct task_struct *kenvctrld_task;