Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1645150pxy; Mon, 2 Aug 2021 07:00:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzIGxJ/KKZUpFvqwXKW2SsjxsQ3Dt0zAWciistPomulEx8rfpsliv8zqktl8Ttup55cciES X-Received: by 2002:a17:906:1ccf:: with SMTP id i15mr15662346ejh.120.1627912824532; Mon, 02 Aug 2021 07:00:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627912824; cv=none; d=google.com; s=arc-20160816; b=mrVXwBda2r6eAXlOwkY65X7P/ORorbE0amHa0uynePUFKmvSubwKVFhhSz/vfs1A2F 1Nz5Z3x6yWLsMAxEFQFZ0oX50hNRozY0QlyBqp8piRe6cCPthbJWvJquJu7KS0RVofeN VeUDqZoCbhG7n4+epYonMQLZTAqDWPQdGn8ekVYoVIjG1AsayrBDhzI6aTXgoUDVQrJy LPT1FONsm/6YnGakrfxd9Lb6V2T5ZMgeAE8jQ1lMaqU2Qwb9lh/iq4yVzYG4CdKAjpLT 0oxFbtyMIInIG52qCduVfu4MJsS8ZOIEPsDnVhOyaNrUQGNN8HdyC+TlC6E5Q4bslQzD /25w== 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=7zQ3T12Dh1zbejP6iYJy37bJ1HR7y8ePN+uxy9vkyDE=; b=CIwUw4sPC5QQz+jS/HKxNEraPkz0p82+g0vIqJ2eAMYpVey1yhQsfm4NeZD9j6mPAO sZcbF8zpOnYrF+ei7UEGcoIGPRgSY19SKnSo0SJRsxeJk5XjxrMzclRFWBnqpTfR/vha G7E1H5KarXxXTQbYNirhDETGavV+sl1x9Z1Sgja6WzTIYjxkDDsRzzEPCgHskwcXqQhq 1avqt87mNkg8Bl0BgMruNCqG8/HPx21lj85j+wqO426/tcBrKH4cYMkBMibBreOvETAL wj9b7jEnVOxdKQygHO0qv6EjaiQnD9heLcYABCg9pwLOT/21tLKuvymE3MW8V7d/Dzr1 3USg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=T14kwlNp; 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 o5si10631626edc.478.2021.08.02.07.00.00; Mon, 02 Aug 2021 07:00:24 -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=T14kwlNp; 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 S234873AbhHBN6U (ORCPT + 99 others); Mon, 2 Aug 2021 09:58:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:33684 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235012AbhHBNv4 (ORCPT ); Mon, 2 Aug 2021 09:51:56 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id F0F216113A; Mon, 2 Aug 2021 13:51:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627912280; bh=k4h1MxhslHtYf3FpDSfYUWgKXCp9I8ZCgB+e8ScY/NU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=T14kwlNpUy9QM8l4HUXbuc4lo7Rb5xt0O+0fKIIhavSZQOBxLZgMfXqRozKlW3l0q Ofiu4zZpGYk8IheBJx8Rr76ibEvyL+rLvvzXnkiE1qtBqeWgzkkIU1P36/k+YuyNjL V4nFZqyjrhqIsUni4NeSrjVeNw+vl6u8Tff+75ts= 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 5.4 28/40] mlx4: Fix missing error code in mlx4_load_one() Date: Mon, 2 Aug 2021 15:45:08 +0200 Message-Id: <20210802134336.290750751@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210802134335.408294521@linuxfoundation.org> References: <20210802134335.408294521@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 cb4664a040ab..35882d6ded8b 100644 --- a/drivers/net/ethernet/mellanox/mlx4/main.c +++ b/drivers/net/ethernet/mellanox/mlx4/main.c @@ -3526,6 +3526,7 @@ slave_start: if (!SRIOV_VALID_STATE(dev->flags)) { mlx4_err(dev, "Invalid SRIOV state\n"); + err = -EINVAL; goto err_close; } } -- 2.30.2