Skip to content
Commit ba9b4081 authored by Colin Ian King's avatar Colin Ian King Committed by Greg Kroah-Hartman
Browse files

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: d193abf1 ("usb: ohci-da8xx: add vbus and overcurrent gpios")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Cc: stable <stable@vger.kernel.org>
Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Link: https://lore.kernel.org/r/20200107123901.101190-1-colin.king@canonical.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 96a0c128
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment