Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1642167pxy; Mon, 2 Aug 2021 06:55:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyvPyPXoF0lFTFj9eWIZp0d5oIHrh+sJ/ZeSoP5dN7svNqrqOQcKbc0XTvKf0bR1evq0yxC X-Received: by 2002:a02:c769:: with SMTP id k9mr6249073jao.68.1627912553983; Mon, 02 Aug 2021 06:55:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627912553; cv=none; d=google.com; s=arc-20160816; b=yoOP0r2KhvW6Yxiy9KDEtKCkL7KmCU0yOHhWM6pwNoD3YvnT3GH+lG/cixK/Eku/dd xCo7w1rQv0PyJh7MTV+a0xUKNoLAjxY5gFIQjGjc9v+LvJGfXlWk/CX7yGEiK2udkE/b ettqsrhkBevrmJM+9gk4AqlqYvQPInA3c5XAJUp8lfh9v0OUZx++ehO1TxQq6nWANuv8 VPkkyerrS+vMLAAjkVFAHIw44kIuSlliQkKz5vi1g2errK6pRauB+K01kUIY5GlNJyEP XLtYsrcX1+ZLa8djCZ6kIl+vMAbTdBogzVGeh7dqkXT7OiIna8YqGEKFTsMQhCT0UOh0 2zig== 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=Vp6XDj0qbRalNQYHnNoZ2/UL31CFT9AkqEMVdi9nBUM=; b=uvDBYUnxSaHNojLRscIx7Hv5ydVbe+/RPl8ERlI1UJqEmoWk2jqYlwKsmRW6sjz1Rr Xr4pvBOflU4vi25OaGNWWT6TAUFtN5ShzEu2Pf76szT9y0BkrfUWx2BBsjHSJJsxBeJG kHa1+/JjPVWaDb5cl6DlInh2uy3yhATovlwyUz9gMCRpnwuOmdAHpMel2gSmjbsgVs1o TUjI6l/s2vg0R96/lRH2cSG+z6tTpujhghA4MxHHmPNANi4fKM6lJtNZ3ZTpLaQmvF5L h0DSUElKAxEtCOrfKrF8izA1Z3kacu1RbGYlusbXUQZxPg9cnio03PEciuZ8I0ColAtg z6JA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="eSy/4cIy"; 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 l3si12645396ioq.17.2021.08.02.06.55.42; Mon, 02 Aug 2021 06:55:53 -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="eSy/4cIy"; 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 S235627AbhHBNyP (ORCPT + 99 others); Mon, 2 Aug 2021 09:54:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:58758 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234090AbhHBNth (ORCPT ); Mon, 2 Aug 2021 09:49:37 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id F11C060FC4; Mon, 2 Aug 2021 13:49:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627912167; bh=Av70WNpnlffcxbPAsOpIVE7w5PtPxS+AltYMrv+oQpE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eSy/4cIyaca+n3Ap70y2oswdz3gLeQLdNOdcwAByQx2gR8EoSR1hXrLJv4slywzMU rgZNZyCwgcHmFaHgBIUxMWjZoOwX8J43dtr6c6KVvgm05bcNQn031iZp13QDHn1QU+ gZvXhgG2PTKQWpUhZsbkb+QQQQNyuUP8Nb9fzGRY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Abaci Robot , Jiapeng Chong , Tariq Toukan , "David S. Miller" , Sasha Levin Subject: [PATCH 4.14 31/38] mlx4: Fix missing error code in mlx4_load_one() Date: Mon, 2 Aug 2021 15:44:53 +0200 Message-Id: <20210802134335.812097570@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210802134334.835358048@linuxfoundation.org> References: <20210802134334.835358048@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 7e4960b3d66d7248b23de3251118147812b42da2 ] The error code is missing in this code scenario, add the error code '-EINVAL' to the return value 'err'. Eliminate the follow smatch warning: drivers/net/ethernet/mellanox/mlx4/main.c:3538 mlx4_load_one() warn: missing error code 'err'. Reported-by: Abaci Robot Fixes: 7ae0e400cd93 ("net/mlx4_core: Flexible (asymmetric) allocation of EQs and MSI-X vectors for PF/VFs") Signed-off-by: Jiapeng Chong Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/mellanox/mlx4/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c index c6660b61e836..69692f7a523c 100644 --- a/drivers/net/ethernet/mellanox/mlx4/main.c +++ b/drivers/net/ethernet/mellanox/mlx4/main.c @@ -3469,6 +3469,7 @@ slave_start: if (!SRIOV_VALID_STATE(dev->flags)) { mlx4_err(dev, "Invalid SRIOV state\n"); + err = -EINVAL; goto err_close; } } -- 2.30.2