mtd: rawnand: gpmi: don't leak PM reference in error path
authorChristian Eggers <ceggers@arri.de>
Tue, 25 Jan 2022 08:16:19 +0000 (09:16 +0100)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 26 Jan 2022 09:02:36 +0000 (10:02 +0100)
commitcb517137ed2da63156d66295a8fa06f6b63625f0
tree85a503c1ddf4fcc1b42e03d3ee3d9120373badb0
parent5aba2e308680c98886b44aad0f0ad8d03c527c19
mtd: rawnand: gpmi: don't leak PM reference in error path

If gpmi_nfc_apply_timings() fails, the PM runtime usage counter must be
dropped.

Reported-by: Pavel Machek <pavel@denx.de>
Fixes: 42ea573bf08a ("mtd: rawnand: gpmi: Add ERR007117 protection for nfc_apply_timings")
Signed-off-by: Christian Eggers <ceggers@arri.de>
Cc: stable@vger.kernel.org
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20220125081619.6286-1-ceggers@arri.de
drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c