Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2631579pxj; Mon, 14 Jun 2021 03:32:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwlVih7epMLiMNxweab9C0HB76WxAWMtTKjTd856bXfOP4en76zSWEVqlT+CZd+vepGJ0S1 X-Received: by 2002:a05:6402:11c9:: with SMTP id j9mr16423551edw.89.1623666769528; Mon, 14 Jun 2021 03:32:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623666769; cv=none; d=google.com; s=arc-20160816; b=djeQqgNWvYM2N14xk48IpfirrCYd6TX/h0hDTI5DtrRRhqatkaA0X1wT8/eMayh62E WDj9EzKk+Y9bHzQTNJQG1MMcSyrjXr5ntBguxDPBMLvv6Lmawpa1Hf3a/x15GcQmPQfu F4V9RF9x7SWWcVlGn1eXUO52nbZ+QvuI7g8OVWQ3/Gj47BqIfMQghGd22EhRmMoCwuRp Bq79yBp2DYmfDkyzndPo9QgQ/NIRAJWO4fuW56j5Hc6Ym2cDUj8BB4W+Z1hmsicIXZkE sOLXAs4F+69zARe1MsJiLOYqsI2TPKCHQq5T/sPr2VOgzuAKe38J8lrjlP0N+Ybaf34t 9ZeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ezjhhWn/kKIOQ5K+HOS26ZODyULd3J/72jPl69bOOmc=; b=XKGZTWXs/N3Rysp2PL1kIUFIhdAK37TdISYEIezByhw3KkF3cMJgdImHzErcAFR8Al GTjTlcUXCL0jOY9/c3hxxs3uWU9ClnUPGO7k+564EPN8V8tBKrGOwpx8gtBOjeoH1uD/ qTumPGzz7ZeKJP/lZmZgQIfM5lB/qN8hC3xQC8WXwPDqjOw5TcP84vARTfQVS4KkEnHm CbYmJ2D6G6sXtGI5FFfPDPXk34A97okvmqWtVNQW4JOHz4j18Dq/bnhjhjHSf9ltqXua xugAyu8nKUHvWWFSffGeLd/eIn6GZGNu6r9QLwdMVpezl0eBacP9w9987iUqTdvUpM6y dkJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=I4Rfe9mW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u20si11347315edv.439.2021.06.14.03.32.26; Mon, 14 Jun 2021 03:32:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=I4Rfe9mW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233045AbhFNKcr (ORCPT + 99 others); Mon, 14 Jun 2021 06:32:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:38468 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232918AbhFNKbq (ORCPT ); Mon, 14 Jun 2021 06:31:46 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id EB6A9611C0; Mon, 14 Jun 2021 10:29:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1623666583; bh=0NXTFvWE17t98H7R7BVX/lsCPyLJTlsSyz/0pbNeoiM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I4Rfe9mWpo2zPYIBWT1aIkl0xSGai1jG33STzzVP3/XNz3ZNY6Xqd7PTM51P07yM6 egvFKroHTg3BOc8H1hyJ8PJWrsiOlBqq23alAQnVpWXAvOF1B4EHEwx+KYBWbjmPFP X9M4sd0754FIaOd0Uqsy/TAhR8ToH5gQzRu8tjqA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Abaci Robot , Jiapeng Chong , "David S. Miller" , Sasha Levin Subject: [PATCH 4.4 14/34] bnx2x: Fix missing error code in bnx2x_iov_init_one() Date: Mon, 14 Jun 2021 12:27:05 +0200 Message-Id: <20210614102642.048442269@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210614102641.582612289@linuxfoundation.org> References: <20210614102641.582612289@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jiapeng Chong [ Upstream commit 65161c35554f7135e6656b3df1ce2c500ca0bdcf ] Eliminate the follow smatch warning: drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c:1227 bnx2x_iov_init_one() warn: missing error code 'err'. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c index 55a7774e8ef5..92c965cb3633 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c @@ -1245,8 +1245,10 @@ int bnx2x_iov_init_one(struct bnx2x *bp, int int_mode_param, goto failed; /* SR-IOV capability was enabled but there are no VFs*/ - if (iov->total == 0) + if (iov->total == 0) { + err = -EINVAL; goto failed; + } iov->nr_virtfn = min_t(u16, iov->total, num_vfs_param); -- 2.30.2