From: "Jan Beulich" <JBeulich@suse.com>
To: <david.vrabel@citrix.com>, <boris.ostrovsky@oracle.com>,
"Juergen Gross" <JGross@suse.com>
Cc: <xen-devel@lists.xenproject.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH v2] xen/manage: correct return value check on xenbus_scanf()
Date: Tue, 08 Nov 2016 00:44:39 -0700 [thread overview]
Message-ID: <58219077020000780011CF59@prv-mh.provo.novell.com> (raw)
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>
---
v2: For consistency with other code don't consider zero an error
(utilizing that xenbus_scanf() at present won't return zero).
Adjust commit message accordingly.
---
drivers/xen/manage.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- 4.9-rc4/drivers/xen/manage.c
+++ 4.9-rc4-xen-manage-xenbus_scanf/drivers/xen/manage.c
@@ -277,7 +277,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;
next reply other threads:[~2016-11-08 7:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-08 7:44 Jan Beulich [this message]
[not found] <58219077020000780011CF59@suse.com>
2016-11-08 7:51 ` Juergen Gross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=58219077020000780011CF59@prv-mh.provo.novell.com \
--to=jbeulich@suse.com \
--cc=JGross@suse.com \
--cc=boris.ostrovsky@oracle.com \
--cc=david.vrabel@citrix.com \
--cc=linux-kernel@vger.kernel.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®