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

tty: sysrq: delete unnecessary check

This code checks if (write) is true twice in a row. It's more
readable to delete the first check.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/aJNAhHtKkhWjosDV@stanley.mountain
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Dan Carpenter and committed by
Greg Kroah-Hartman
96c08ff8 8f5ae30d

+1 -2
+1 -2
drivers/tty/sysrq.c
··· 1133 1133 * Behaves like do_proc_dointvec as t does not have min nor max. 1134 1134 */ 1135 1135 ret = proc_dointvec_minmax(&t, write, buffer, lenp, ppos); 1136 - 1137 - if (ret || !write) 1136 + if (ret) 1138 1137 return ret; 1139 1138 1140 1139 if (write)