diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2010-09-20 12:31:07 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-10-22 13:21:47 -0400 |
commit | 969affff54702785330de553b790372e261e93f9 (patch) | |
tree | bddcd3e92dce21d70c6f661b2dfe8357841c8e53 /drivers/usb/gadget | |
parent | e5dcd531ac7a040f1b4d35f58914a36ad6174e84 (diff) |
USB: atmel_usba_udc: force vbus_pin at -EINVAL when gpio_request failled
to ensure gpio_is_valid return false
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r-- | drivers/usb/gadget/atmel_usba_udc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c index e4810c6a0b1f..b5e20e873cba 100644 --- a/drivers/usb/gadget/atmel_usba_udc.c +++ b/drivers/usb/gadget/atmel_usba_udc.c | |||
@@ -2015,6 +2015,9 @@ static int __init usba_udc_probe(struct platform_device *pdev) | |||
2015 | } else { | 2015 | } else { |
2016 | disable_irq(gpio_to_irq(udc->vbus_pin)); | 2016 | disable_irq(gpio_to_irq(udc->vbus_pin)); |
2017 | } | 2017 | } |
2018 | } else { | ||
2019 | /* gpio_request fail so use -EINVAL for gpio_is_valid */ | ||
2020 | ubc->vbus_pin = -EINVAL; | ||
2018 | } | 2021 | } |
2019 | } | 2022 | } |
2020 | 2023 | ||