Input: sysrq: delete unnecessary check
Subsystems (2)
PATCH 1/1 Input: 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 <[email protected]>
--- drivers/tty/sysrq.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/tty/sysrq.c +1 -2
@@ -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. */ ret =proc_dointvec_minmax (&t, write, buffer, lenp, ppos); - -if (ret || !write) +if (ret)return ret;if (write)
Signature · 1 line
2.47.2
Quoted 2 lines · Dan Carpenter
This code checks if (write) is true twice in a row. It's more readable to delete the first check.
Not sure why "Input" in $SUBJ, but regardless:
Reviewed-by Jiri Slaby <[email protected]>
thanks,
Signature · 2 lines
js suse labs