mirror of
https://github.com/torvalds/linux.git
synced 2024-12-14 23:25:54 +00:00
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>
This commit is contained in:
parent
e5dcd531ac
commit
969affff54
@ -2015,6 +2015,9 @@ static int __init usba_udc_probe(struct platform_device *pdev)
|
||||
} else {
|
||||
disable_irq(gpio_to_irq(udc->vbus_pin));
|
||||
}
|
||||
} else {
|
||||
/* gpio_request fail so use -EINVAL for gpio_is_valid */
|
||||
ubc->vbus_pin = -EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user