mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-11-30 15:53:22 -05:00
mtd: rawnand: gpmi: don't leak PM reference in error path
commit 9161f365c91614e5a3f5c6dcc44c3b1b33bc59c0 upstream. If gpmi_nfc_apply_timings() fails, the PM runtime usage counter must be dropped. Reported-by: Pavel Machek <[email protected]> Fixes: f53d4c109a66 ("mtd: rawnand: gpmi: Add ERR007117 protection for nfc_apply_timings") Signed-off-by: Christian Eggers <[email protected]> Cc: [email protected] Signed-off-by: Miquel Raynal <[email protected]> Link: https://lore.kernel.org/linux-mtd/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
c6fee7c854
commit
4cd3281a91
1 changed files with 2 additions and 1 deletions
|
|
@ -2442,7 +2442,7 @@ static int gpmi_nfc_exec_op(struct nand_chip *chip,
|
|||
this->hw.must_apply_timings = false;
|
||||
ret = gpmi_nfc_apply_timings(this);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto out_pm;
|
||||
}
|
||||
|
||||
dev_dbg(this->dev, "%s: %d instructions\n", __func__, op->ninstrs);
|
||||
|
|
@ -2571,6 +2571,7 @@ unmap:
|
|||
|
||||
this->bch = false;
|
||||
|
||||
out_pm:
|
||||
pm_runtime_mark_last_busy(this->dev);
|
||||
pm_runtime_put_autosuspend(this->dev);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue