mmc: sdhci-msm: don't bug on PM QoS request counter going negative
Currently we are crashing the system if PM QoS request counter goes negative but this doesn't seem to be right way to handle. We should instead skip decrementing this counter once it reaches 0 and just print a dump stack to know the callstack. This change fixes this as mentioned above. Change-Id: I36fb03b1ddf8e04ecc9fe449496b656db84e77d2 Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
This commit is contained in:
parent
919917a73c
commit
24c09c2fdf
1 changed files with 6 additions and 4 deletions
|
@ -3217,11 +3217,13 @@ void sdhci_msm_pm_qos_irq_unvote(struct sdhci_host *host, bool async)
|
||||||
if (!msm_host->pm_qos_irq.enabled)
|
if (!msm_host->pm_qos_irq.enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
counter = atomic_dec_return(&msm_host->pm_qos_irq.counter);
|
if (atomic_read(&msm_host->pm_qos_irq.counter)) {
|
||||||
if (counter < 0) {
|
counter = atomic_dec_return(&msm_host->pm_qos_irq.counter);
|
||||||
pr_err("%s: counter=%d\n", __func__, counter);
|
} else {
|
||||||
BUG();
|
WARN(1, "attempt to decrement pm_qos_irq.counter when it's 0");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (counter)
|
if (counter)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue