aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/progs/test_autoload.c
diff options
context:
space:
mode:
authorJens Wiklander <[email protected]>2024-09-02 12:58:03 +0200
committerUlf Hansson <[email protected]>2024-09-04 15:04:57 +0200
commit5854809b51f4e3868202d9b45e628133d76b48cd (patch)
tree97bd1985b05459d3e67b75fe157f47b0ebcf555a /tools/testing/selftests/bpf/progs/test_autoload.c
parentedd3183c5c5f9fe7aede49a41678556bc8bf618f (diff)
rpmb: fix error path in rpmb_dev_register()
Until this patch was rpmb_dev_register() always freeing rdev in the error path. However, past device_register() it must not do that since the memory is now managed by the device even if it failed to register properly. So fix this by doing a put_device() before returning the error code. Fixes the smatch warning: drivers/misc/rpmb-core.c:204 rpmb_dev_register() warn: freeing device managed memory (leak): 'rdev' Fixes: 1e9046e3a154 ("rpmb: add Replay Protected Memory Block (RPMB) subsystem") Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Jens Wiklander <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_autoload.c')
0 files changed, 0 insertions, 0 deletions