mtd: rawnand: gpmi: Fix runtime PM imbalance on error
authorDinghao Liu <dinghao.liu@zju.edu.cn>
Fri, 22 May 2020 09:51:39 +0000 (17:51 +0800)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Sun, 31 May 2020 08:53:37 +0000 (10:53 +0200)
commit550e68ea36a6671a96576c0531685ce6e6c0d19d
tree6b1fc6993b46ccf5ddc8e1592902af026c8d6647
parent5d55714fa5ac1ac93a9224821f289fbf46532d30
mtd: rawnand: gpmi: Fix runtime PM imbalance on error

pm_runtime_get_sync() increments the runtime PM usage counter even
when it returns an error code. Thus a pairing decrement is needed on
the error handling path to keep the counter balanced.

Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20200522095139.19653-1-dinghao.liu@zju.edu.cn
drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c