summaryrefslogtreecommitdiffstats
path: root/drivers/net/netdevsim/dev.c
diff options
context:
space:
mode:
authorJinpeng Cui <cui.jinpeng2@zte.com.cn>2022-08-31 17:43:29 +0200
committerJakub Kicinski <kuba@kernel.org>2022-09-02 05:50:48 +0200
commit5603072e0b3733c076529e49ee3150cbb3a7a5cc (patch)
tree1575eb5f777279d812d129b01fc456de182c7856 /drivers/net/netdevsim/dev.c
parentnet: rtnetlink: use netif_oper_up instead of open code (diff)
downloadlinux-5603072e0b3733c076529e49ee3150cbb3a7a5cc.tar.xz
linux-5603072e0b3733c076529e49ee3150cbb3a7a5cc.zip
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>
Diffstat (limited to 'drivers/net/netdevsim/dev.c')
-rw-r--r--drivers/net/netdevsim/dev.c5
1 files 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,