Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1640758pxy; Mon, 2 Aug 2021 06:53:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1g+qoLHTq2+//hzCstqDdAzaQQAkGkhr0I4/hhxXB3cHOdi474LjZEhv+7ilf7lMa14bn X-Received: by 2002:a92:dc4a:: with SMTP id x10mr718525ilq.166.1627912414211; Mon, 02 Aug 2021 06:53:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627912414; cv=none; d=google.com; s=arc-20160816; b=R2ydCruAtNRMCH8HmO9r3DKUkDN0/cnIJhhLu1kovWKjjRvn/fJ+5JBpzpkSFbF61f 4n2SZirLJIEd0aqXdGUyQn5EaKLUO54ZaRseXys2D3npTSO+LxRS62HSgmOO2CKTRFNk m3u1IaNtpBu1oQy8cDTGKzGLb154xVSTF3KvG6L29yJ4GFYcOSkHwqedDxzODbZnNpzC yDRCzwFG3PQm1ET4lar0j01UB5IsJVI6g6uDmxJ0ijF3H+Rcxm/HGIXCiXixTG3HYr72 yR3/aocc5kacIL/Gx+7soqkikTclfapx25EAMpn1wJhswENMoy22+bgy4ZWZ6lwEJk89 rEhw== 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=CvuNxyUwT9Rb3+nRvKUNX7xEsQ2TOPVFzEcEpdboWm0=; b=AFgHgOmRLAE967npMdVxmXhX1DrYFxDhcbI6lSjvf3k16X8NYAYPwq9MVGhRkZdm/8 RJFBgXP46gtHsmAdNCQtRy0U7ZW/z1wmJeWhf0YRvVUakFmeW9OO4HzBkenapZhVbf22 m3sfOKIlxzKY4bhIfcb1gf3PuqHmU8UqBrGxyrTyLU/Ao0FJMdNMyhseZ8/qw2MArJg9 4NC7aanXXIHHpxbzeOc4qregpELeIvu9xJyU8wTmJT7xpBYJqEVbdtMQlAfE37nV/Lfb +6q5SPW1a5UrDcOFbzpMWDSj0o4L5Jw9yY1uOU5KnIAsD/uhkoBGD/7yWbzl1r4/cUyS GnWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=cL2F9QbH; 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 t15si11958349ilg.47.2021.08.02.06.53.22; Mon, 02 Aug 2021 06:53:34 -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=cL2F9QbH; 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 S234552AbhHBNvr (ORCPT + 99 others); Mon, 2 Aug 2021 09:51:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:57790 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234214AbhHBNrr (ORCPT ); Mon, 2 Aug 2021 09:47:47 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2DBF561108; Mon, 2 Aug 2021 13:47:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627912056; bh=mOg3BDnfyiJigpI5hu3Cp3YHpTZ5RwPfL3ty9u8NPYU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cL2F9QbHTk30gu2qdj5Ox7cEXTkd3ZVGs1RCXbLTQmVBNwhyjxU9O2bF7AyPMiK4d OcNN50FG2VZIE0evHeP578kg2pwiwwuL/yHEC2wzJKHQAisTYP2x5ggE4eCDY8JH1K i6ksGcXZbBRUcNkfyH4nsLWWluOHC3pF3KCr7lUs= 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.9 28/32] mlx4: Fix missing error code in mlx4_load_one() Date: Mon, 2 Aug 2021 15:44:48 +0200 Message-Id: <20210802134333.819267417@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210802134332.931915241@linuxfoundation.org> References: <20210802134332.931915241@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 9b6a96074df8..78b04f271344 100644 --- a/drivers/net/ethernet/mellanox/mlx4/main.c +++ b/drivers/net/ethernet/mellanox/mlx4/main.c @@ -3445,6 +3445,7 @@ slave_start: if (!SRIOV_VALID_STATE(dev->flags)) { mlx4_err(dev, "Invalid SRIOV state\n"); + err = -EINVAL; goto err_close; } } -- 2.30.2