Commit 047304d0 authored by Jakub Kicinski's avatar Jakub Kicinski

netdevsim: fix uninit value in nsim_drv_configure_vfs()

Build bot points out that I missed initializing ret
after refactoring.
Reported-by: default avatarkernel test robot <lkp@intel.com>
Fixes: 1c401078 ("netdevsim: move details of vf config to dev")
Link: https://lore.kernel.org/r/20211101221845.3188490-1-kuba@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent d4a07dc5
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment