aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi/mpiutil.c
diff options
context:
space:
mode:
authorJohn Keeping <[email protected]>2022-11-22 12:35:23 +0000
committerGreg Kroah-Hartman <[email protected]>2022-11-29 08:56:09 +0100
commit944fe915d00d3cb1bacb1e77cabfb6dc82e6f8b8 (patch)
treee340f46d18fbc8894047252e3cdcc2389496c3ae /lib/mpi/mpiutil.c
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 <[email protected]> Reviewed-by: Andrzej Pietrasiewicz <[email protected]> Reviewed-by: Lee Jones <[email protected]> Signed-off-by: John Keeping <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'lib/mpi/mpiutil.c')
0 files changed, 0 insertions, 0 deletions