mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
gpio: omap: Fix gpiochip_add() handling for deferred probe
Currently we gpio-omap breaks if gpiochip_add() returns -EPROBE_DEFER: [ 0.570000] gpiochip_add: GPIOs 0..31 (gpio) failed to register [ 0.570000] omap_gpio 48310000.gpio: Could not register gpio chip -517 ... [ 3.670000] omap_gpio 48310000.gpio: Unbalanced pm_runtime_enable! Let's fix the issue by adding the missing pm_runtime_put() on error. Cc: Grygorii Strashko <[email protected]> Cc: Javier Martinez Canillas <[email protected]> Cc: Kevin Hilman <[email protected]> Cc: Santosh Shilimkar <[email protected]> Acked-by: Santosh Shilimkar <[email protected]> Signed-off-by: Tony Lindgren <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
This commit is contained in:
parent
e799f35c32
commit
5e606abef5
1 changed files with 4 additions and 1 deletions
|
|
@ -1253,8 +1253,11 @@ static int omap_gpio_probe(struct platform_device *pdev)
|
|||
omap_gpio_mod_init(bank);
|
||||
|
||||
ret = omap_gpio_chip_init(bank, irqc);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
pm_runtime_put_sync(bank->dev);
|
||||
pm_runtime_disable(bank->dev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
omap_gpio_show_rev(bank);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue