diff options
author | Joel Stanley <joel@jms.id.au> | 2015-04-15 19:16:50 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-15 19:35:23 -0400 |
commit | 7975a9b7323d5a47e5b651bac810f3271e7156df (patch) | |
tree | 1012f4417d8d1a8819038edbd150dcb00aa7d971 /drivers/sbus | |
parent | 972fae6993cbbb934345011664dc703c0891dda3 (diff) |
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>
Diffstat (limited to 'drivers/sbus')
-rw-r--r-- | drivers/sbus/char/bbc_envctrl.c | 3 | ||||
-rw-r--r-- | drivers/sbus/char/envctrl.c | 7 |
2 files changed, 2 insertions, 8 deletions
diff --git a/drivers/sbus/char/bbc_envctrl.c b/drivers/sbus/char/bbc_envctrl.c index 0787b9756165..228c782d6433 100644 --- a/drivers/sbus/char/bbc_envctrl.c +++ b/drivers/sbus/char/bbc_envctrl.c | |||
@@ -160,8 +160,7 @@ static void do_envctrl_shutdown(struct bbc_cpu_temperature *tp) | |||
160 | printk(KERN_CRIT "kenvctrld: Shutting down the system now.\n"); | 160 | printk(KERN_CRIT "kenvctrld: Shutting down the system now.\n"); |
161 | 161 | ||
162 | shutting_down = 1; | 162 | shutting_down = 1; |
163 | if (orderly_poweroff(true) < 0) | 163 | orderly_poweroff(true); |
164 | printk(KERN_CRIT "envctrl: shutdown execution failed\n"); | ||
165 | } | 164 | } |
166 | 165 | ||
167 | #define WARN_INTERVAL (30 * HZ) | 166 | #define WARN_INTERVAL (30 * HZ) |
diff --git a/drivers/sbus/char/envctrl.c b/drivers/sbus/char/envctrl.c index e244cf3d9ec8..5609b602c54d 100644 --- a/drivers/sbus/char/envctrl.c +++ b/drivers/sbus/char/envctrl.c | |||
@@ -970,18 +970,13 @@ static struct i2c_child_t *envctrl_get_i2c_child(unsigned char mon_type) | |||
970 | static void envctrl_do_shutdown(void) | 970 | static void envctrl_do_shutdown(void) |
971 | { | 971 | { |
972 | static int inprog = 0; | 972 | static int inprog = 0; |
973 | int ret; | ||
974 | 973 | ||
975 | if (inprog != 0) | 974 | if (inprog != 0) |
976 | return; | 975 | return; |
977 | 976 | ||
978 | inprog = 1; | 977 | inprog = 1; |
979 | printk(KERN_CRIT "kenvctrld: WARNING: Shutting down the system now.\n"); | 978 | printk(KERN_CRIT "kenvctrld: WARNING: Shutting down the system now.\n"); |
980 | ret = orderly_poweroff(true); | 979 | 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 | } | ||
985 | } | 980 | } |
986 | 981 | ||
987 | static struct task_struct *kenvctrld_task; | 982 | static struct task_struct *kenvctrld_task; |