netdevsim: fix uninit value in nsim_drv_configure_vfs()
Build bot points out that I missed initializing ret
after refactoring.
Reported-by: kernel test robot <lkp@intel.com>
Fixes: 1c401078bc
("netdevsim: move details of vf config to dev")
Link: https://lore.kernel.org/r/20211101221845.3188490-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
d4a07dc5ac
commit
047304d0bf
@ -1723,13 +1723,11 @@ int nsim_drv_configure_vfs(struct nsim_bus_dev *nsim_bus_dev,
|
||||
unsigned int num_vfs)
|
||||
{
|
||||
struct nsim_dev *nsim_dev = dev_get_drvdata(&nsim_bus_dev->dev);
|
||||
int ret;
|
||||
int ret = 0;
|
||||
|
||||
mutex_lock(&nsim_dev->vfs_lock);
|
||||
if (nsim_bus_dev->num_vfs == num_vfs) {
|
||||
ret = 0;
|
||||
if (nsim_bus_dev->num_vfs == num_vfs)
|
||||
goto exit_unlock;
|
||||
}
|
||||
if (nsim_bus_dev->num_vfs && num_vfs) {
|
||||
ret = -EBUSY;
|
||||
goto exit_unlock;
|
||||
|
Loading…
Reference in New Issue
Block a user