Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 283189d3 authored by Li Fei's avatar Li Fei Committed by Mark Brown
Browse files

regmap: irq: call pm_runtime_put in pm_runtime_get_sync failed case



Even in failed case of pm_runtime_get_sync, the usage_count
is incremented. In order to keep the usage_count with correct
value and runtime power management to behave correctly, call
pm_runtime_put(_sync) in such case.

Signed-off-by Liu Chuansheng <chuansheng.liu@intel.com>
Signed-off-by: default avatarLi Fei <fei.li@intel.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent a2b37efc
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -184,6 +184,7 @@ static irqreturn_t regmap_irq_thread(int irq, void *d)
		if (ret < 0) {
		if (ret < 0) {
			dev_err(map->dev, "IRQ thread failed to resume: %d\n",
			dev_err(map->dev, "IRQ thread failed to resume: %d\n",
				ret);
				ret);
			pm_runtime_put(map->dev);
			return IRQ_NONE;
			return IRQ_NONE;
		}
		}
	}
	}