Skip to content
Commit 80ef9286 authored by Ammar Faizi's avatar Ammar Faizi Committed by Jakub Kicinski
Browse files

net: devlink: Fix missing mutex_unlock() call



Commit 2dec18ad forgets to call mutex_unlock() before the function
returns in the error path:

   New smatch warnings:
   net/core/devlink.c:6392 devlink_nl_cmd_region_new() warn: inconsistent \
   returns '&region->snapshot_lock'.

Make sure we call mutex_unlock() in this error path.

Reported-by: default avatarkernel test robot <lkp@intel.com>
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Fixes: 2dec18ad ("net: devlink: remove region snapshots list dependency on devlink->lock")
Signed-off-by: default avatarAmmar Faizi <ammarfaizi2@gnuweeb.org>
Reviewed-by: default avatarJiri Pirko <jiri@nvidia.com>
Link: https://lore.kernel.org/r/20220801115742.1309329-1-ammar.faizi@intel.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent d81c7cdd
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