From patchwork Thu Jul 7 08:04:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 645801 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rlVyv6ff8z9sDk for ; Thu, 7 Jul 2016 18:24:23 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=sfs-ml-1.v29.ch3.sourceforge.com) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1bL4bc-00030N-VU; Thu, 07 Jul 2016 08:24:20 +0000 Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1bL4bb-0002zd-EB for tpmdd-devel@lists.sourceforge.net; Thu, 07 Jul 2016 08:24:19 +0000 Received-SPF: pass (sog-mx-3.v43.ch3.sourceforge.com: domain of suse.com designates 137.65.248.74 as permitted sender) client-ip=137.65.248.74; envelope-from=JBeulich@suse.com; helo=prv-mh.provo.novell.com; Received: from prv-mh.provo.novell.com ([137.65.248.74]) by sog-mx-3.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1bL4ba-0002Iv-I9 for tpmdd-devel@lists.sourceforge.net; Thu, 07 Jul 2016 08:24:19 +0000 Received: from INET-PRV-MTA by prv-mh.provo.novell.com with Novell_GroupWise; Thu, 07 Jul 2016 02:04:00 -0600 Message-Id: <577E291002000078000FBF18@prv-mh.provo.novell.com> X-Mailer: Novell GroupWise Internet Agent 14.2.0 Date: Thu, 07 Jul 2016 02:04:00 -0600 From: "Jan Beulich" To: ,, , Mime-Version: 1.0 Content-Disposition: inline X-Spam-Score: -0.8 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_PASS SPF: sender matches SPF record 0.8 AWL AWL: Adjusted score from AWL reputation of From: address X-Headers-End: 1bL4ba-0002Iv-I9 Cc: Juergen Gross , xen-devel@lists.xenproject.org, boris.ostrovsky@oracle.com, "tpmdd-devel@lists.sourceforge.net" , david.vrabel@citrix.com Subject: [tpmdd-devel] [PATCH] xen-tpmfront: correct return value check on xenbus_scanf() X-BeenThere: tpmdd-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Tpm Device Driver maintainance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tpmdd-devel-bounces@lists.sourceforge.net Only a positive return value indicates success. Signed-off-by: Jan Beulich Reviewed-by: Jarkko Sakkinen --- drivers/char/tpm/xen-tpmfront.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ------------------------------------------------------------------------------ Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape --- 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,