Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Joel Stanley and committed by
Linus Torvalds
7975a9b7 972fae69

+2 -8
+1 -2
drivers/sbus/char/bbc_envctrl.c
··· 160 160 printk(KERN_CRIT "kenvctrld: Shutting down the system now.\n"); 161 161 162 162 shutting_down = 1; 163 - if (orderly_poweroff(true) < 0) 164 - printk(KERN_CRIT "envctrl: shutdown execution failed\n"); 163 + orderly_poweroff(true); 165 164 } 166 165 167 166 #define WARN_INTERVAL (30 * HZ)
+1 -6
drivers/sbus/char/envctrl.c
··· 970 970 static void envctrl_do_shutdown(void) 971 971 { 972 972 static int inprog = 0; 973 - int ret; 974 973 975 974 if (inprog != 0) 976 975 return; 977 976 978 977 inprog = 1; 979 978 printk(KERN_CRIT "kenvctrld: WARNING: Shutting down the system now.\n"); 980 - ret = orderly_poweroff(true); 981 - if (ret < 0) { 982 - printk(KERN_CRIT "kenvctrld: WARNING: system shutdown failed!\n"); 983 - inprog = 0; /* unlikely to succeed, but we could try again */ 984 - } 979 + orderly_poweroff(true); 985 980 } 986 981 987 982 static struct task_struct *kenvctrld_task;