Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1438245
| From | "Jan Beulich" <JBeulich@suse.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] xen/manage: correct return value check on xenbus_scanf() |
| Date | 2016-07-07 09:50 +0200 |
| Message-ID | <rScem-3Vx-23@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Only a positive return value indicates success.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
drivers/xen/manage.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- 4.7-rc6-xenbus_scanf.orig/drivers/xen/manage.c
+++ 4.7-rc6-xenbus_scanf/drivers/xen/manage.c
@@ -275,7 +275,7 @@ static void sysrq_handler(struct xenbus_
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;
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH] xen/manage: correct return value check on xenbus_scanf() "Jan Beulich" <JBeulich@suse.com> - 2016-07-07 09:50 +0200
csiph-web