lkml.org 
[lkml]   [2020]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] extcon: arizona: Fix runtime PM imbalance on error
Date
When arizona_request_irq() returns an error code, a
pairing runtime PM usage counter decrement is needed
to keep the counter balanced. For error paths after
this function, things are the same.

Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
---
drivers/extcon/extcon-arizona.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c
index 7401733db08b..470bbc8e5089 100644
--- a/drivers/extcon/extcon-arizona.c
+++ b/drivers/extcon/extcon-arizona.c
@@ -1744,6 +1744,7 @@ static int arizona_extcon_probe(struct platform_device *pdev)
err_rise:
arizona_free_irq(arizona, jack_irq_rise, info);
err_gpio:
+ pm_runtime_put(&pdev->dev);
gpiod_put(info->micd_pol_gpio);
err_register:
pm_runtime_disable(&pdev->dev);
--
2.17.1
\
 
 \ /
  Last update: 2020-05-22 13:08    [W:0.050 / U:13.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site