diff options
author | Colin Ian King <[email protected]> | 2018-07-05 14:36:47 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2018-07-06 16:36:19 +0200 |
commit | 98a1a0c7a321a46e805df289c7d385a9b1b4c661 (patch) | |
tree | 12c51af5b7a1cdfce2ab02f640091a840af7900b /tools/perf/util/trace-event-scripting.c | |
parent | 11b71782c1d10d9bccc31825cf84291cd7588a1e (diff) |
usb: typec: unlock dp->lock on error exit path, and also zero ret if successful
One of the error handling paths forgets to unlock dp->lock on the error
exit path leading to a potential lock-up. Also the return path for a
successful call to the function configuration_store can return an
uninitialized error return code if dp->alt->active is false, so ensure
ret is zeroed on the successful exit path to avoid garbage being returned.
Detected by CoverityScan, CID#1471597 ("Unitialized scalar variable")
Fixes: 0e3bb7d6894d ("usb: typec: Add driver for DisplayPort alternate mode")
Signed-off-by: Colin Ian King <[email protected]>
Acked-by: Heikki Krogerus <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions