mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-05-02 18:17:50 -04:00
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:
@@ -1723,13 +1723,11 @@ int nsim_drv_configure_vfs(struct nsim_bus_dev *nsim_bus_dev,
|
|||||||
unsigned int num_vfs)
|
unsigned int num_vfs)
|
||||||
{
|
{
|
||||||
struct nsim_dev *nsim_dev = dev_get_drvdata(&nsim_bus_dev->dev);
|
struct nsim_dev *nsim_dev = dev_get_drvdata(&nsim_bus_dev->dev);
|
||||||
int ret;
|
int ret = 0;
|
||||||
|
|
||||||
mutex_lock(&nsim_dev->vfs_lock);
|
mutex_lock(&nsim_dev->vfs_lock);
|
||||||
if (nsim_bus_dev->num_vfs == num_vfs) {
|
if (nsim_bus_dev->num_vfs == num_vfs)
|
||||||
ret = 0;
|
|
||||||
goto exit_unlock;
|
goto exit_unlock;
|
||||||
}
|
|
||||||
if (nsim_bus_dev->num_vfs && num_vfs) {
|
if (nsim_bus_dev->num_vfs && num_vfs) {
|
||||||
ret = -EBUSY;
|
ret = -EBUSY;
|
||||||
goto exit_unlock;
|
goto exit_unlock;
|
||||||
|
|||||||
Reference in New Issue
Block a user