mirror of https://github.com/torvalds/linux.git
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>
This commit is contained in:
parent
8f5ae30d69
commit
96c08ff80b
|
|
@ -1133,8 +1133,7 @@ static int sysrq_sysctl_handler(const struct ctl_table *table, int write,
|
||||||
* Behaves like do_proc_dointvec as t does not have min nor max.
|
* Behaves like do_proc_dointvec as t does not have min nor max.
|
||||||
*/
|
*/
|
||||||
ret = proc_dointvec_minmax(&t, write, buffer, lenp, ppos);
|
ret = proc_dointvec_minmax(&t, write, buffer, lenp, ppos);
|
||||||
|
if (ret)
|
||||||
if (ret || !write)
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
if (write)
|
if (write)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue