From patchwork Thu Jul 7 07:48:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 9218001 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 5DDBB607D9 for ; Thu, 7 Jul 2016 07:49:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5417128787 for ; Thu, 7 Jul 2016 07:49:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 484F828789; Thu, 7 Jul 2016 07:49:02 +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 vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E19A928787 for ; Thu, 7 Jul 2016 07:49:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756495AbcGGHsz (ORCPT ); Thu, 7 Jul 2016 03:48:55 -0400 Received: from prv-mh.provo.novell.com ([137.65.248.74]:45996 "EHLO prv-mh.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756514AbcGGHsy convert rfc822-to-8bit (ORCPT ); Thu, 7 Jul 2016 03:48:54 -0400 Received: from INET-PRV-MTA by prv-mh.provo.novell.com with Novell_GroupWise; Thu, 07 Jul 2016 01:48:53 -0600 Message-Id: <577E258502000078000FBE6F@prv-mh.provo.novell.com> X-Mailer: Novell GroupWise Internet Agent 14.2.0 Date: Thu, 07 Jul 2016 01:48:53 -0600 From: "Jan Beulich" To: , Cc: "David Vrabel" , , "Boris Ostrovsky" , "Juergen Gross" , "linux-fbdev" Subject: [PATCH] xen-fbfront: correct return value checks on xenbus_scanf() Mime-Version: 1.0 Content-Disposition: inline Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Only a positive return value indicates success. Signed-off-by: Jan Beulich --- drivers/video/fbdev/xen-fbfront.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 4.7-rc6-xenbus_scanf.orig/drivers/video/fbdev/xen-fbfront.c +++ 4.7-rc6-xenbus_scanf/drivers/video/fbdev/xen-fbfront.c @@ -658,13 +658,13 @@ InitWait: goto InitWait; /* no InitWait seen yet, fudge it */ if (xenbus_scanf(XBT_NIL, info->xbdev->otherend, - "request-update", "%d", &val) < 0) + "request-update", "%d", &val) <= 0) val = 0; if (val) info->update_wanted = 1; if (xenbus_scanf(XBT_NIL, dev->otherend, - "feature-resize", "%d", &val) < 0) + "feature-resize", "%d", &val) <= 0) val = 0; info->feature_resize = val; break;