mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
xen/manage: correct return value check on xenbus_scanf()
A negative return value indicates an error; in fact the function at present won't ever return zero. Signed-off-by: Jan Beulich <[email protected]> Reviewed-by: Juergen Gross <[email protected]> Signed-off-by: Boris Ostrovsky <[email protected]>
This commit is contained in:
1 parent
cc272163ea
commit
4fed1b125e
1 file changed
+1
-1
@@ -277,7 +277,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;
|
||||
|
||||
Reference in new issue
Block a user