mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-03-18 04:54:52 +00:00
netdevsim: remove redundant variable ret
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> Link: https://lore.kernel.org/r/20220831154329.305372-1-cui.jinpeng2@zte.com.cn Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
abbc79280a
commit
5603072e0b
1 changed files with 2 additions and 3 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue