summaryrefslogtreecommitdiff
path: root/drivers/base
diff options
context:
space:
mode:
authorCharles Keepax <ckeepax@opensource.cirrus.com>2019-08-12 12:24:09 +0300
committerMark Brown <broonie@kernel.org>2019-08-12 16:03:20 +0300
commitfba5b1e9ab527bd46bc529370d52a7b2b552dce1 (patch)
tree35bed6c9aa1f8d9655c9b505d34df9869cbd420f /drivers/base
parent5f9e832c137075045d15cd6899ab0505cfb2ca4b (diff)
downloadlinux-fba5b1e9ab527bd46bc529370d52a7b2b552dce1.tar.xz
regmap-irq: Correct error paths in regmap_irq_thread for pm_runtime
Some error paths in regmap_irq_thread put the pm_runtime others do not, there is no reason to leave the pm_runtime enabled in some cases so update those paths to also put the pm_runtime. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20190812092409.21593-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/regmap/regmap-irq.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c
index c9dc70ceca5f..3d64c9331a82 100644
--- a/drivers/base/regmap/regmap-irq.c
+++ b/drivers/base/regmap/regmap-irq.c
@@ -370,7 +370,6 @@ static irqreturn_t regmap_irq_thread(int irq, void *d)
if (ret < 0) {
dev_err(map->dev, "IRQ thread failed to resume: %d\n",
ret);
- pm_runtime_put(map->dev);
goto exit;
}
}
@@ -425,8 +424,6 @@ static irqreturn_t regmap_irq_thread(int irq, void *d)
dev_err(map->dev,
"Failed to read IRQ status %d\n",
ret);
- if (chip->runtime_pm)
- pm_runtime_put(map->dev);
goto exit;
}
}
@@ -478,8 +475,6 @@ static irqreturn_t regmap_irq_thread(int irq, void *d)
dev_err(map->dev,
"Failed to read IRQ status: %d\n",
ret);
- if (chip->runtime_pm)
- pm_runtime_put(map->dev);
goto exit;
}
}
@@ -513,10 +508,10 @@ static irqreturn_t regmap_irq_thread(int irq, void *d)
}
}
+exit:
if (chip->runtime_pm)
pm_runtime_put(map->dev);
-exit:
if (chip->handle_post_irq)
chip->handle_post_irq(chip->irq_drv_data);