From patchwork Tue Nov 8 13:34:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101567 Delivered-To: patch@linaro.org Received: by 10.140.97.165 with SMTP id m34csp1551119qge; Tue, 8 Nov 2016 05:36:24 -0800 (PST) X-Received: by 10.99.242.5 with SMTP id v5mr18588220pgh.181.1478612184820; Tue, 08 Nov 2016 05:36:24 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k132si9610307pfc.139.2016.11.08.05.36.24; Tue, 08 Nov 2016 05:36:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751845AbcKHNgW (ORCPT + 4 others); Tue, 8 Nov 2016 08:36:22 -0500 Received: from mout.kundenserver.de ([212.227.17.24]:50136 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751479AbcKHNgU (ORCPT ); Tue, 8 Nov 2016 08:36:20 -0500 Received: from wuerfel.lan. ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue103) with ESMTPA (Nemesis) id 0Lzq1j-1cqagm2mLj-0153rS; Tue, 08 Nov 2016 14:34:55 +0100 From: Arnd Bergmann To: David Vrabel Cc: Arnd Bergmann , Wei Liu , Paul Durrant , "David S. Miller" , Juergen Gross , Filipe Manco , xen-devel@lists.xenproject.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [Xen PATCH] xen-netback: fix error handling output Date: Tue, 8 Nov 2016 14:34:34 +0100 Message-Id: <20161108133449.1649345-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:DeaWYpsne8qCGVpZMo6FVCcwnnMMHqIVROXHxUXH+eotNBvMZqe /cLShOTc5kpv0kTQmSE1p/mwUDhBI7FXsSlkr2Z2dcK/7m1A643DjtIup8vhbv5+Bc8hX/V Lo7TS/vull6Lu7LyXUU56/n132HX4VU60oJheRF36gIqI5F32sdQ4RnqwVF/gsyihgxHH6r 7uhqyX9YJjwxkfc6pB7YA== X-UI-Out-Filterresults: notjunk:1; V01:K0:IWToA1OPm+k=:EHklTcikne1cQBWCpSAVSq lFC768Bj5K9jd/9paaaOQigMqDwBOlDgYq3qc+UncGoPnKKNsbFGdIYR/qB4LHJDTjmEhg7Iw RvK/DsFfrLhEmWeZGM/DDQONFLzIFl1OMOke8BQ0Bm18RoaUHbXNBgYK+LIahDq5H/RFyTJYV VAAwqj0xCwQR9FZg8loXAzOwStjbw4TYmRBAo+HmjEoh1yTUt5rVIinA0zefs5Zzpzjk895IQ Z9dGjAJoF4W/R1kjtx30oVyvH4+9MUjZc24FqVQenJQDz7yhgKM1bmjxsD/PkcLY9tggTqJK9 phsAU6lGCVN0e2TdIh6PiCYgWES0uyThAGEA//o5YUh2ctparrrAonjMOTDHIb4ucCxFfpPL9 c8qJ5BwWb6PuQFeRqnkWHDZkaqnx1LEqfFmBkbLHmSlfo3iLWglwgVRslqd7uR2c3NeBfnK63 f2T02Rou156R8f8a3Cd+lnfGBLxc/0UwnjQBlJmTlT6b/VHNRc0v+Dh1quSFK0Tz62TLInnBT 9+5NQwFeK/ye4iUqF2qoefhhJEk4xVGlwd9IYNnWAZXss4tLcuGsXLv/hFMoBS3C0aBNWbA8j AAIN8B2m3MQVllBbgxmVNo0HcMUPvSrs0orjkuMxmDf0mgfByXNmcwGYwweIUfWL5BTvQ+TR+ TVQQ9uFl3NuMF2lBGUwH6OATOvydJjRtgRpCRY232czfaTQQUG6itRVQiJMvs9rHXgkc= Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The connect function prints an unintialized error code after an earlier initialization was removed: drivers/net/xen-netback/xenbus.c: In function 'connect': drivers/net/xen-netback/xenbus.c:938:3: error: 'err' may be used uninitialized in this function [-Werror=maybe-uninitialized] This prints it as -EINVAL instead, which seems to be the most appropriate error code. Before the patch that caused the warning, this would print a positive number returned by vsscanf() instead, which is also wrong. We probably don't need a backport though, as fixing the warning here should be sufficient. Fixes: f95842e7a9f2 ("xen: make use of xenbus_read_unsigned() in xen-netback") Fixes: 8d3d53b3e433 ("xen-netback: Add support for multiple queues") Signed-off-by: Arnd Bergmann --- drivers/net/xen-netback/xenbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.9.0 diff --git a/drivers/net/xen-netback/xenbus.c b/drivers/net/xen-netback/xenbus.c index 7356e00fac54..bfed79877b8a 100644 --- a/drivers/net/xen-netback/xenbus.c +++ b/drivers/net/xen-netback/xenbus.c @@ -935,7 +935,7 @@ static void connect(struct backend_info *be) "multi-queue-num-queues", 1); if (requested_num_queues > xenvif_max_queues) { /* buggy or malicious guest */ - xenbus_dev_fatal(dev, err, + xenbus_dev_fatal(dev, -EINVAL, "guest requested %u queues, exceeding the maximum of %u.", requested_num_queues, xenvif_max_queues); return;