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
1 changed files with 3 additions and 0 deletions
|
|
@ -2015,6 +2015,9 @@ static int __init usba_udc_probe(struct platform_device *pdev)
|
||||||
} else {
|
} else {
|
||||||
disable_irq(gpio_to_irq(udc->vbus_pin));
|
disable_irq(gpio_to_irq(udc->vbus_pin));
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
/* gpio_request fail so use -EINVAL for gpio_is_valid */
|
||||||
|
ubc->vbus_pin = -EINVAL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue