aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/progs/test_autoload.c
diff options
context:
space:
mode:
authorMichal Wilczynski <[email protected]>2023-06-13 11:43:10 +0300
committerHans de Goede <[email protected]>2023-06-14 09:21:19 +0200
commit966cca72ab20289083521a385fa56035d85a222d (patch)
tree70751c0cb1fe3986797ce2345d62f40180441515 /tools/testing/selftests/bpf/progs/test_autoload.c
parent9ce930869164abf2d2d260e5470ed7ffc17a32c3 (diff)
platform/x86/dell/dell-rbtn: Fix resources leaking on error path
Currently rbtn_add() in case of failure is leaking resources. Fix this by adding a proper rollback. Move devm_kzalloc() before rbtn_acquire(), so it doesn't require rollback in case of failure. While at it, remove unnecessary assignment of NULL to device->driver_data and unnecessary whitespace, plus add a break for the default case in a switch. Suggested-by: Ilpo Järvinen <[email protected]> Suggested-by: Pali Rohár <[email protected]> Fixes: 817a5cdb40c8 ("dell-rbtn: Dell Airplane Mode Switch driver") Signed-off-by: Michal Wilczynski <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Acked-by: Rafael J. Wysocki <[email protected]> Reviewed-by: Pali Rohár <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Hans de Goede <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_autoload.c')
0 files changed, 0 insertions, 0 deletions