Commit 96c08ff8 authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman
Browse files

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: default avatarDan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: default avatarJiri Slaby <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/aJNAhHtKkhWjosDV@stanley.mountain


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8f5ae30d
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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)