* [PATCH net-next] netdevsim: fix uninit value in nsim_drv_configure_vfs()
@ 2021-11-01 22:18 Jakub Kicinski
2021-11-01 23:40 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Jakub Kicinski @ 2021-11-01 22:18 UTC (permalink / raw)
To: davem; +Cc: netdev
Build bot points out that I missed initializing ret
after refactoring.
Reported-by: kernel test robot <lkp@intel.com>
Fixes: 1c401078bcf3 ("netdevsim: move details of vf config to dev")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
drivers/net/netdevsim/dev.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/netdevsim/dev.c b/drivers/net/netdevsim/dev.c
index 5db40d713d2a..54345c096a16 100644
--- a/drivers/net/netdevsim/dev.c
+++ b/drivers/net/netdevsim/dev.c
@@ -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;
--
2.31.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] netdevsim: fix uninit value in nsim_drv_configure_vfs()
2021-11-01 22:18 [PATCH net-next] netdevsim: fix uninit value in nsim_drv_configure_vfs() Jakub Kicinski
@ 2021-11-01 23:40 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-11-01 23:40 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: davem, netdev
Hello:
This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:
On Mon, 1 Nov 2021 15:18:45 -0700 you wrote:
> Build bot points out that I missed initializing ret
> after refactoring.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Fixes: 1c401078bcf3 ("netdevsim: move details of vf config to dev")
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
>
> [...]
Here is the summary with links:
- [net-next] netdevsim: fix uninit value in nsim_drv_configure_vfs()
https://git.kernel.org/netdev/net-next/c/047304d0bfa5
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-11-01 23:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-01 22:18 [PATCH net-next] netdevsim: fix uninit value in nsim_drv_configure_vfs() Jakub Kicinski
2021-11-01 23:40 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).