mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 22:14:04 +02:00
xen/manage: correct return value check on xenbus_scanf()
[ Upstream commit 4fed1b125e ]
A negative return value indicates an error; in fact the function at
present won't ever return zero.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
762d0762b9
commit
fff544c8cf
|
|
@ -275,7 +275,7 @@ static void sysrq_handler(struct xenbus_watch *watch, const char **vec,
|
|||
err = xenbus_transaction_start(&xbt);
|
||||
if (err)
|
||||
return;
|
||||
if (!xenbus_scanf(xbt, "control", "sysrq", "%c", &sysrq_key)) {
|
||||
if (xenbus_scanf(xbt, "control", "sysrq", "%c", &sysrq_key) < 0) {
|
||||
pr_err("Unable to read sysrq code in control/sysrq\n");
|
||||
xenbus_transaction_end(xbt, 1);
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user