Commit 65161c35 authored by Jiapeng Chong's avatar Jiapeng Chong Committed by David S. Miller
Browse files

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'.

Reported-by: default avatarAbaci Robot <abaci@linux.alibaba.com>
Signed-off-by: default avatarJiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9453d45e
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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);