aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/libxed.py
diff options
context:
space:
mode:
authorJohn Keeping <john@metanate.com>2022-11-22 12:35:23 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-11-29 08:56:09 +0100
commit944fe915d00d3cb1bacb1e77cabfb6dc82e6f8b8 (patch)
treee340f46d18fbc8894047252e3cdcc2389496c3ae /tools/perf/scripts/python/libxed.py
parent70a3288a7586526315105c699b687d78cd32559a (diff)
usb: gadget: f_hid: tidy error handling in hidg_alloc
Unify error handling at the end of the function, reducing the risk of missing something on one of the error paths. Moving the increment of opts->refcnt later means there is no need to decrement it on the error path and is safe as this is guarded by opts->lock which is held for this entire section. Tested-by: Lee Jones <lee@kernel.org> Reviewed-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com> Reviewed-by: Lee Jones <lee@kernel.org> Signed-off-by: John Keeping <john@metanate.com> Link: https://lore.kernel.org/r/20221122123523.3068034-4-john@metanate.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/libxed.py')
0 files changed, 0 insertions, 0 deletions