Commit 5603072e authored by Jinpeng Cui's avatar Jinpeng Cui Committed by Jakub Kicinski

netdevsim: remove redundant variable ret

Return value directly from nsim_dev_reload_create()
instead of getting value from redundant variable ret.
Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarJinpeng Cui <cui.jinpeng2@zte.com.cn>
Link: https://lore.kernel.org/r/20220831154329.305372-1-cui.jinpeng2@zte.com.cnSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent abbc7928
......@@ -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,
......
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