Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752245AbdHRX3Z (ORCPT ); Fri, 18 Aug 2017 19:29:25 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:34938 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751673AbdHRX3X (ORCPT ); Fri, 18 Aug 2017 19:29:23 -0400 Date: Fri, 18 Aug 2017 16:29:22 -0700 (PDT) Message-Id: <20170818.162922.1769160270805446057.davem@davemloft.net> To: colin.king@canonical.com Cc: saeedm@mellanox.com, matanb@mellanox.com, leonro@mellanox.com, netdev@vger.kernel.org, linux-rdma@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mlx5: ensure 0 is returned when vport is zero From: David Miller In-Reply-To: <20170818134925.16604-1-colin.king@canonical.com> References: <20170818134925.16604-1-colin.king@canonical.com> X-Mailer: Mew version 6.7 on Emacs 25.2 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Fri, 18 Aug 2017 16:29:23 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 652 Lines: 16 From: Colin King Date: Fri, 18 Aug 2017 14:49:25 +0100 > From: Colin Ian King > > Currently, if vport is zero then then an uninialized return status > in err is returned. Since the only return status at the end of the > function esw_add_uc_addr is zero for the current set of return paths > we may as well just return 0 rather than err to fix this issue. > > Detected by CoverityScan, CID#1452698 ("Uninitialized scalar variable") > > Fixes: eeb66cdb6826 ("net/mlx5: Separate between E-Switch and MPFS") > Signed-off-by: Colin Ian King Applied to net-next, thanks.