summaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/hub.c
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2020-01-07 12:39:01 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-08 17:34:18 +0100
commitba9b40810bb43e6bf73b395012b98633c03f7f59 (patch)
tree0a7bb16dcb13807be03313796e43eac16d61dc88 /drivers/usb/core/hub.c
parent96a0c12843109e5c4d5eb1e09d915fdd0ce31d25 (diff)
downloadlinux-stable-ba9b40810bb43e6bf73b395012b98633c03f7f59.tar.gz
linux-stable-ba9b40810bb43e6bf73b395012b98633c03f7f59.tar.bz2
linux-stable-ba9b40810bb43e6bf73b395012b98633c03f7f59.zip
usb: ohci-da8xx: ensure error return on variable error is set
Currently when an error occurs when calling devm_gpiod_get_optional or calling gpiod_to_irq it causes an uninitialized error return in variable 'error' to be returned. Fix this by ensuring the error variable is set from da8xx_ohci->oc_gpio and oc_irq. Thanks to Dan Carpenter for spotting the uninitialized error in the gpiod_to_irq failure case. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: d193abf1c913 ("usb: ohci-da8xx: add vbus and overcurrent gpios") Signed-off-by: Colin Ian King <colin.king@canonical.com> Cc: stable <stable@vger.kernel.org> Acked-by: Alan Stern <stern@rowland.harvard.edu> Link: https://lore.kernel.org/r/20200107123901.101190-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/core/hub.c')
0 files changed, 0 insertions, 0 deletions