All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen-tpmfront: correct return value check on xenbus_scanf()
@ 2016-07-07  8:04 Jan Beulich
       [not found] ` <577E291002000078000FBF18-rw/UEucdPrvD8XXLLHKrIiOjQekVJEpY@public.gmane.org>
  2016-07-07 10:35 ` Jarkko Sakkinen
  0 siblings, 2 replies; 10+ messages in thread
From: Jan Beulich @ 2016-07-07  8:04 UTC (permalink / raw)
  To: peterhuewe, jarkko.sakkinen, jgunthorpe, tpmdd
  Cc: Juergen Gross, xen-devel, boris.ostrovsky,
	tpmdd-devel@lists.sourceforge.net, david.vrabel

Only a positive return value indicates success.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
 drivers/char/tpm/xen-tpmfront.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- 4.7-rc6-xenbus_scanf.orig/drivers/char/tpm/xen-tpmfront.c
+++ 4.7-rc6-xenbus_scanf/drivers/char/tpm/xen-tpmfront.c
@@ -344,7 +344,7 @@ static void backend_changed(struct xenbu
 			break;
 
 		if (xenbus_scanf(XBT_NIL, dev->otherend,
-				"feature-protocol-v2", "%d", &val) < 0)
+				"feature-protocol-v2", "%d", &val) <= 0)
 			val = 0;
 		if (!val) {
 			xenbus_dev_fatal(dev, -EINVAL,




_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-07-07 12:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-07  8:04 [PATCH] xen-tpmfront: correct return value check on xenbus_scanf() Jan Beulich
     [not found] ` <577E291002000078000FBF18-rw/UEucdPrvD8XXLLHKrIiOjQekVJEpY@public.gmane.org>
2016-07-07 10:35   ` Jarkko Sakkinen
2016-07-07 10:38     ` Jarkko Sakkinen
     [not found]       ` <20160707103859.GA13815-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-07-07 12:00         ` Jan Beulich
2016-07-07 12:00           ` Jan Beulich
2016-07-07 12:21           ` Jarkko Sakkinen
2016-07-07 12:21           ` Jarkko Sakkinen
2016-07-07 12:00       ` Jan Beulich
2016-07-07 10:38     ` Jarkko Sakkinen
2016-07-07 10:35 ` Jarkko Sakkinen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.