All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sudarsana Reddy Kalluru <skalluru@marvell.com>
To: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>,
	Ariel Elior <aelior@marvell.com>
Cc: GR-everest-linux-l2 <GR-everest-linux-l2@marvell.com>,
	"davem@davemloft.ne" <davem@davemloft.ne>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] bnx2x: Fix missing error code in bnx2x_iov_init_one()
Date: Tue, 25 May 2021 12:51:37 +0000	[thread overview]
Message-ID: <PH0PR18MB4039B944D4D822A168428DB6D3259@PH0PR18MB4039.namprd18.prod.outlook.com> (raw)
In-Reply-To: <1621940412-73333-1-git-send-email-jiapeng.chong@linux.alibaba.com>

> -----Original Message-----
> From: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> Sent: Tuesday, May 25, 2021 4:30 PM
> To: Ariel Elior <aelior@marvell.com>
> Cc: Sudarsana Reddy Kalluru <skalluru@marvell.com>; GR-everest-linux-l2
> <GR-everest-linux-l2@marvell.com>; davem@davemloft.ne;
> kuba@kernel.org; netdev@vger.kernel.org; linux-kernel@vger.kernel.org;
> Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> Subject: [PATCH] bnx2x: Fix missing error code in bnx2x_iov_init_one()
> 
> Eliminate the follow smatch warning:
> 
> drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c:1227
> bnx2x_iov_init_one() warn: missing error code 'err'.

Not sure if it's false positive, variable 'err' is initialized at line 1195.
1194
1195         err = -EIO;
1196         /* verify ari is enabled */

[Changes look ok though]

> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> ---
>  drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
> b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
> index d21f085..27943b0 100644
> --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
> +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
> @@ -1223,8 +1223,10 @@ int bnx2x_iov_init_one(struct bnx2x *bp, int
> int_mode_param,
>  		goto failed;
> 
>  	/* SR-IOV capability was enabled but there are no VFs*/
> -	if (iov->total == 0)
> +	if (iov->total == 0) {
> +		err = -EINVAL;
>  		goto failed;
> +	}
> 
>  	iov->nr_virtfn = min_t(u16, iov->total, num_vfs_param);
> 
> --
> 1.8.3.1


  reply	other threads:[~2021-05-25 12:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-25 11:00 [PATCH] bnx2x: Fix missing error code in bnx2x_iov_init_one() Jiapeng Chong
2021-05-25 12:51 ` Sudarsana Reddy Kalluru [this message]
2021-05-25 23:00 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=PH0PR18MB4039B944D4D822A168428DB6D3259@PH0PR18MB4039.namprd18.prod.outlook.com \
    --to=skalluru@marvell.com \
    --cc=GR-everest-linux-l2@marvell.com \
    --cc=aelior@marvell.com \
    --cc=davem@davemloft.ne \
    --cc=jiapeng.chong@linux.alibaba.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.