devlink: Avoid duplicate check for reload enabled flag

Reload operation is enabled or not is already checked by
devlink_reload(). Hence, remove the duplicate check from
devlink_nl_cmd_reload().

Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Parav Pandit 2020-07-21 19:53:52 +03:00 committed by David S. Miller
parent 6553e561ca
commit 9232a3e67b
1 changed files with 1 additions and 1 deletions

View File

@ -2967,7 +2967,7 @@ static int devlink_nl_cmd_reload(struct sk_buff *skb, struct genl_info *info)
struct net *dest_net = NULL;
int err;
if (!devlink_reload_supported(devlink) || !devlink->reload_enabled)
if (!devlink_reload_supported(devlink))
return -EOPNOTSUPP;
err = devlink_resources_validate(devlink, NULL, info);