Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1638484pxy; Mon, 2 Aug 2021 06:50:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxnkkYlGOKgRcqUleq4XkWxJlBjPJlWUhZ1PQAzt+AEnaQIoVrJznhul8IPaaAIcNTgFApi X-Received: by 2002:a02:8206:: with SMTP id o6mr14805839jag.92.1627912220899; Mon, 02 Aug 2021 06:50:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627912220; cv=none; d=google.com; s=arc-20160816; b=oRkW/xltcacA8sBeaTJZTB55B7/Lo+QaeTkJFvBJqzYmOLjF4HpzzYSd88QKYGxUxG QhaaQshoN2u5V7C1rFyFrZZ0JFryjARaFbrhVlCqZMLG258TGplWgsr/i4nxvpMmOI6k 4PRH+deCMFCrAlvVdpXhRjRtEWAo82Ww6kbfTL1Tn3HBvhwoojcurY0Gcnsqg5QkUe2h jZHBIxh0ZpHXir3f5nhuu0uSK9dkEJpOI48jeK9AQTF/nZnAfSRGzDnYxY+p4eGWBIPH I3t+/sXuJvIT8zvMhtXZ2Jov1almKWyVQtWK/2djHoDBZM/flT5rW/+/ce4aorIOCTZ8 VeAA== 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=wKPZmZnvhCXytJQMG9rtHXFJtyEocYuMLpb/CYKLUPQ=; b=QivXZEyS9Syz943gepPdo3MrTcrnUuTXab9JT+mmlPDbkFzeW+EUPCAH3XXIDa2+Uv NI4mWnI69VocVBBMfptR/ihm9Rxg2DzoTBLN1VAAG9wVwBN0nX1/4nurB+jjOfihHTBR Usb1uCzIcavnaI4jQQRLtspo0NNKPOUPVf9Mrz2L+p9HLds4ZbLnExXr/7sL10KVUI78 6lOVEGER1+Hlr5RrLQEHHMev9qKCsWINLcNF4gd/KsS1er77865y3SiHA1FHoqI/F6kj mpSFtSkQpHJcQHIy2QOpO9ZxV8q+yhHBRNi0HI9THUgJpIY/vCQKEFf4WHbyDiz1OF1Z Rfxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=diXx7fb6; 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 u11si11853540jak.14.2021.08.02.06.50.09; Mon, 02 Aug 2021 06:50:20 -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=diXx7fb6; 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 S234441AbhHBNsN (ORCPT + 99 others); Mon, 2 Aug 2021 09:48:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:56626 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234095AbhHBNqv (ORCPT ); Mon, 2 Aug 2021 09:46:51 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id ED23960F6D; Mon, 2 Aug 2021 13:46:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627912002; bh=Ya/4acmD5+oL0bkBKlhN28c2G0R0pmpQAmwHkJIFPV4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=diXx7fb6E+QprjvPBJHcLr2nfVMqfXd6Yd3lp8w6soYqcAeMfOiZgYZuiUdIsKC8X 5XANpqUK2O2NoS/uMtgeHbPJHYUg/EQ2wNx9LnTWSP7qCrdomxRF6nMIe6NemYyNTm nF1K+yXnD8Z3Kou4InDNxxKpJLcj+Z07T8riDyoM= 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.4 23/26] mlx4: Fix missing error code in mlx4_load_one() Date: Mon, 2 Aug 2021 15:44:33 +0200 Message-Id: <20210802134332.778713135@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210802134332.033552261@linuxfoundation.org> References: <20210802134332.033552261@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 b774ba64bd4b..913e0fd10fde 100644 --- a/drivers/net/ethernet/mellanox/mlx4/main.c +++ b/drivers/net/ethernet/mellanox/mlx4/main.c @@ -3222,6 +3222,7 @@ slave_start: if (!SRIOV_VALID_STATE(dev->flags)) { mlx4_err(dev, "Invalid SRIOV state\n"); + err = -EINVAL; goto err_close; } } -- 2.30.2