From patchwork Fri Feb 3 16:37:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9554669 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 D676F604A7 for ; Fri, 3 Feb 2017 16:37:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CB95F27D85 for ; Fri, 3 Feb 2017 16:37:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BE7E827FBB; Fri, 3 Feb 2017 16:37:36 +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 6353327D85 for ; Fri, 3 Feb 2017 16:37:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750890AbdBCQhe (ORCPT ); Fri, 3 Feb 2017 11:37:34 -0500 Received: from mout.kundenserver.de ([212.227.17.24]:58980 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750808AbdBCQhd (ORCPT ); Fri, 3 Feb 2017 11:37:33 -0500 Received: from wuerfel.lan ([78.42.17.5]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.145]) with ESMTPA (Nemesis) id 0M5wgz-1cG5U23TMf-00xsvH; Fri, 03 Feb 2017 17:37:24 +0100 From: Arnd Bergmann To: Saeed Mahameed , Matan Barak , Leon Romanovsky Cc: Arnd Bergmann , "David S. Miller" , Or Gerlitz , Hadar Hen Zion , Roi Dayan , Amir Vadai , Maor Gottlieb , Mark Bloch , netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] [net-next] net/mlx5e: fix another maybe-uninitialized false-positive Date: Fri, 3 Feb 2017 17:37:03 +0100 Message-Id: <20170203163716.3501713-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:2pX4y4+C9WTBxuY2IwfOV9mVDcnISobIY1KOcKXDUhR82u0K9Jm vC7wLdFyZt7+86oTO2Fwcx5npc/BGYB+c6ieLROC4JMjad3OPAax/JyeH0L4bZQ/KSFUwzq ql8ugT0cEDE6FkF/RILAV/JjhoNlH5SP8He79IazEFWqai26XN/3Tcey4o4b6dfjwRKyRDW i51SJ2N4+kEr52zcP5rmw== X-UI-Out-Filterresults: notjunk:1; V01:K0:IZJ1F1bGwXk=:NuSJSD/nfymqVYMJEWJZcF 7KyEja5lo7FKA8sqUHKMcxx+oJg6s1E524ksH9e5RViQakffqxK5PklS1Iq2ej1I7fYLbuf2G xwv4VWiR79bpzt/ZxKKwq/KdNpPJTCKlmjRKvY4wARgIVnvZqn/sKFhPfpGhqZ7RiHpRrw+tM d3K1QjMGvn9n36vrZOTqyagBSnbqI1dW463TYC6yds2CeSGPosE6TZZEdL2RjCA7t3/kr31cd JqdqfhknD/bmtvFgEYFai7OhjLgSx+y90SmRPYE8GetmUmZ0mqjtctn12Pv29T34CcUDV6Pf3 ac9FuiSF1cklPVlsIIAKU3Sy0phxmGomDdaLBn/7FBIVWEyR0i9m1E+ymPIRKfFwN4kPSFDyt QtDhKzH+ZdrQm7L/oKrgYAbNBZv6rinuLbPIUo5/QSSH36b4ukBPYsmAH9LegcpocBUckCMt+ uYcdRXIqg2cVeEadZQ5+LIzA6/J1fjV/f1fLc0iJx93rFa2zUn3q/2cFbl5S7iDvjCFDDBqZ9 VfHUygWqBEGLOPLjmyxn8RajVDvkB0g4gUgU4v9jRjojYaVctXPa9MegE/ow5sKnBihKenTbW 99g4BfZImgdSZ4Xaz/5pGxG/sz2uUuwN1R4fhvX1VGR7qoIxQ0Xem3wuI9cP33Sd92/hqWNM5 dZdpyvyR0rCs9LcZeoHZ9lM99zTY6MKB+mSfUjWHCEqlziGk4YHdNVdKpgVBqDs1La1U= Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In commit abeffce ("net/mlx5e: Fix a -Wmaybe-uninitialized warning"), I fixed a gcc warning for the ipv4 offload handling. Now we get the same warning for the added ipv6 support: drivers/net/ethernet/mellanox/mlx5/core/en_tc.c:815:40: warning: 'out_dev' may be used uninitialized in this function [-Wmaybe-uninitialized] We can apply the same workaround here as well. Fixes: ce99f6b97fcd ("net/mlx5e: Support SRIOV TC encapsulation offloads for IPv6 tunnels") Signed-off-by: Arnd Bergmann --- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c index e3cf5f484153..d87a82682cb5 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c @@ -731,8 +731,8 @@ static int mlx5e_route_lookup_ipv6(struct mlx5e_priv *priv, int ret; dst = ip6_route_output(dev_net(mirred_dev), NULL, fl6); - if (dst->error) { - ret = dst->error; + ret = dst->error; + if (ret) { dst_release(dst); return ret; }