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: 9218321 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4DEBE60467 for ; Thu, 7 Jul 2016 08:24:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D68F4285CB for ; Thu, 7 Jul 2016 08:24:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CA1E928674; Thu, 7 Jul 2016 08:24:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 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 mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4A81A285CB for ; Thu, 7 Jul 2016 08:24:24 +0000 (UTC) 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-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 X-Virus-Scanned: ClamAV using ClamSMTP 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,