netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH linux-next] netdevsim: remove redundant variable ret
@ 2022-08-31 15:43 cgel.zte
  2022-09-02  4:00 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: cgel.zte @ 2022-08-31 15:43 UTC (permalink / raw)
  To: kuba, davem, edumazet
  Cc: pabeni, netdev, linux-kernel, Jinpeng Cui, Zeal Robot

From: Jinpeng Cui <cui.jinpeng2@zte.com.cn>

Return value directly from nsim_dev_reload_create()
instead of getting value from redundant variable ret.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Jinpeng Cui <cui.jinpeng2@zte.com.cn>
---
 drivers/net/netdevsim/dev.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/netdevsim/dev.c b/drivers/net/netdevsim/dev.c
index efea94c27880..794fc0cc73b8 100644
--- a/drivers/net/netdevsim/dev.c
+++ b/drivers/net/netdevsim/dev.c
@@ -965,7 +965,6 @@ static int nsim_dev_reload_up(struct devlink *devlink, enum devlink_reload_actio
 			      struct netlink_ext_ack *extack)
 {
 	struct nsim_dev *nsim_dev = devlink_priv(devlink);
-	int ret;
 
 	if (nsim_dev->fail_reload) {
 		/* For testing purposes, user set debugfs fail_reload
@@ -976,8 +975,8 @@ static int nsim_dev_reload_up(struct devlink *devlink, enum devlink_reload_actio
 	}
 
 	*actions_performed = BIT(DEVLINK_RELOAD_ACTION_DRIVER_REINIT);
-	ret = nsim_dev_reload_create(nsim_dev, extack);
-	return ret;
+
+	return nsim_dev_reload_create(nsim_dev, extack);
 }
 
 static int nsim_dev_info_get(struct devlink *devlink,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH linux-next] netdevsim: remove redundant variable ret
  2022-08-31 15:43 [PATCH linux-next] netdevsim: remove redundant variable ret cgel.zte
@ 2022-09-02  4:00 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-09-02  4:00 UTC (permalink / raw)
  To: xu xin
  Cc: kuba, davem, edumazet, pabeni, netdev, linux-kernel, cui.jinpeng2,
	zealci

Hello:

This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Wed, 31 Aug 2022 15:43:29 +0000 you wrote:
> From: Jinpeng Cui <cui.jinpeng2@zte.com.cn>
> 
> Return value directly from nsim_dev_reload_create()
> instead of getting value from redundant variable ret.
> 
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Jinpeng Cui <cui.jinpeng2@zte.com.cn>
> 
> [...]

Here is the summary with links:
  - [linux-next] netdevsim: remove redundant variable ret
    https://git.kernel.org/netdev/net-next/c/5603072e0b37

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:[~2022-09-02  4:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-31 15:43 [PATCH linux-next] netdevsim: remove redundant variable ret cgel.zte
2022-09-02  4:00 ` 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).