Skip to content

Commit 7975a9b

Browse files
shenkitorvalds
authored andcommitted
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>
1 parent 972fae6 commit 7975a9b

2 files changed

Lines changed: 2 additions & 8 deletions

File tree

‎drivers/sbus/char/bbc_envctrl.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,7 @@ static void do_envctrl_shutdown(struct bbc_cpu_temperature *tp)
160160
printk(KERN_CRIT "kenvctrld: Shutting down the system now.\n");
161161

162162
shutting_down = 1;
163-
if (orderly_poweroff(true) < 0)
164-
printk(KERN_CRIT "envctrl: shutdown execution failed\n");
163+
orderly_poweroff(true);
165164
}
166165

167166
#define WARN_INTERVAL (30 * HZ)

‎drivers/sbus/char/envctrl.c‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -970,18 +970,13 @@ static struct i2c_child_t *envctrl_get_i2c_child(unsigned char mon_type)
970970
static void envctrl_do_shutdown(void)
971971
{
972972
static int inprog = 0;
973-
int ret;
974973

975974
if (inprog != 0)
976975
return;
977976

978977
inprog = 1;
979978
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);
985980
}
986981

987982
static struct task_struct *kenvctrld_task;

0 commit comments

Comments
 (0)