diff options
Diffstat (limited to 'net/devlink/leftover.c')
-rw-r--r-- | net/devlink/leftover.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/devlink/leftover.c b/net/devlink/leftover.c index b1216b8f0acc..fca2b6661362 100644 --- a/net/devlink/leftover.c +++ b/net/devlink/leftover.c @@ -10824,7 +10824,8 @@ static void devlink_param_unregister(struct devlink *devlink, param_item = devlink_param_find_by_name(&devlink->param_list, param->name); - WARN_ON(!param_item); + if (WARN_ON(!param_item)) + return; devlink_param_notify(devlink, 0, param_item, DEVLINK_CMD_PARAM_DEL); list_del(¶m_item->list); kfree(param_item); |