Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1642434pxy; Mon, 2 Aug 2021 06:56:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmkhsZIcYqqO4ORQv6aDuRCXaZdFQXOIkS8IQj2VDaXBzDTWzgjgL64Wd2ymP//VEmll1K X-Received: by 2002:a05:6e02:1aae:: with SMTP id l14mr54799ilv.35.1627912578611; Mon, 02 Aug 2021 06:56:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627912578; cv=none; d=google.com; s=arc-20160816; b=fC71SgiMvWYf5XDjVl/YZZQOWJOdwXult6R0pBNg7qVNaY7fsMcps47wUHTkIjvLVi o7/wLVtOQuwW5gKlmTnl2oYwaCWF7H9cb2nEZMD9uZSk2veg6OHeuyfAvT8KyOxy5oXH P5ZD3OOnafCeZSMSCmjHjLYutFKSfyfwwJFWTEG2Dogj8SsnLbbJW+26sDCTUvn+IWBS jcA1lsnWxrDAQvQEqM6XjNxhLEmAu3y6MB5BQiYe0rWRE4m1dFT9W/f98pGrPBh7RihW luWvX4CD+km176xfnnFciIINb0+dlDGWQMg5S+HgMBVPO4MHEz96KqBl6eXNvbh1Uxcg 3EbA== 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=OVwac8XG3lh52TxbKHlm6ztXwLdT7tF8pQTjdAY9OXs=; b=WLkQdW+pdX6wtP67sqp0dR+aGMX3Ne4bS94wSY8st5+bVqOMae041bqU0/CmcvuB+g QNomF6nIJej2f/owXq7XbPC1RboMZXUafa66sFbdb/D1n8OJU4ogFlVlU7tCtJMfvZFd OJMVqKRUoMK+OJiu93V/+UZBjeYp0ymbVkIQ538lUSfT2Tq9CVLRc1ZvcsOZFgweqsRY sTG/NnZ29Wleyms4h1vWdmQu/wfwsm4JdnY5NzQYEB9UIeMKw1AZgCOhWKP0/kg96Zr8 HR9wuAiV13EJKQuiqhxrrvGWRr2734TYksAb9mAKXeYKoaPX1JU3GaXvMnqGilqODyk5 vY2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=L6jpegpy; 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 x29si11680418jap.52.2021.08.02.06.56.05; Mon, 02 Aug 2021 06:56:18 -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=L6jpegpy; 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 S234815AbhHBNzP (ORCPT + 99 others); Mon, 2 Aug 2021 09:55:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:33610 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234565AbhHBNuF (ORCPT ); Mon, 2 Aug 2021 09:50:05 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 13CCC610FC; Mon, 2 Aug 2021 13:49:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627912195; bh=e72jQk2CinegedZsmoOFdvPMlYsDsyV/qHihCuyi9WY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L6jpegpy10dBrI0KXPwzxwY0n7Tg51m4+StdG4OH111VV1RtVpUBY2yznLI6PpdxE 2XssKxKFv+UEF3BvNS4uMxwtsaGLwiWJqnYEMm638swsbvcVuiJKVFEDJCpLOIBi4t rrVwv5jAU/CuLWtxsON5/ysjW8j+I/fpajfor1rg= 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.19 21/30] mlx4: Fix missing error code in mlx4_load_one() Date: Mon, 2 Aug 2021 15:44:59 +0200 Message-Id: <20210802134334.743739039@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210802134334.081433902@linuxfoundation.org> References: <20210802134334.081433902@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 a0affcb090a0..d9707d47f1e7 100644 --- a/drivers/net/ethernet/mellanox/mlx4/main.c +++ b/drivers/net/ethernet/mellanox/mlx4/main.c @@ -3515,6 +3515,7 @@ slave_start: if (!SRIOV_VALID_STATE(dev->flags)) { mlx4_err(dev, "Invalid SRIOV state\n"); + err = -EINVAL; goto err_close; } } -- 2.30.2