diff mbox

[2/2] gpio: omap : Add missing clk_unprepare().

Message ID f41f83c5a540065ca9fc1cae754b5b4d4a2749a2.1501569628.git.arvind.yadav.cs@gmail.com
State New
Headers show

Commit Message

Arvind Yadav Aug. 1, 2017, 6:44 a.m. UTC
omap_gpio_probe() can fail here and we must disable clock.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/gpio/gpio-omap.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Grygorii Strashko Aug. 1, 2017, 7:40 p.m. UTC | #1
On 08/01/2017 01:44 AM, Arvind Yadav wrote:
> omap_gpio_probe() can fail here and we must disable clock.
> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
> ---
>   drivers/gpio/gpio-omap.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
> index f8c550de..dbf869f 100644
> --- a/drivers/gpio/gpio-omap.c
> +++ b/drivers/gpio/gpio-omap.c
> @@ -1247,6 +1247,8 @@ static int omap_gpio_probe(struct platform_device *pdev)
>   	if (ret) {
>   		pm_runtime_put_sync(dev);
>   		pm_runtime_disable(dev);
> +		if (bank->dbck_flag)
> +			clk_unprepare(bank->dbck);
>   		return ret;
>   	}
>   
> 

Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Linus Walleij Aug. 7, 2017, 11:58 a.m. UTC | #2
On Tue, Aug 1, 2017 at 8:44 AM, Arvind Yadav <arvind.yadav.cs@gmail.com> wrote:

> omap_gpio_probe() can fail here and we must disable clock.
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>

Patch applied with Grygorii's ACK.

yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index f8c550de..dbf869f 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -1247,6 +1247,8 @@  static int omap_gpio_probe(struct platform_device *pdev)
 	if (ret) {
 		pm_runtime_put_sync(dev);
 		pm_runtime_disable(dev);
+		if (bank->dbck_flag)
+			clk_unprepare(bank->dbck);
 		return ret;
 	}