From: Dinghao Liu Date: Fri, 22 May 2020 10:17:13 +0000 (+0800) Subject: mtd: rawnand: gpmi: Fix runtime PM imbalance in gpmi_nand_probe X-Git-Tag: v5.15~3626^2~5^2~30 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8e935b92d269826f1e4bcf31d3f688dbcdf71219;p=platform%2Fkernel%2Flinux-starfive.git mtd: rawnand: gpmi: Fix runtime PM imbalance in gpmi_nand_probe There is no reason that the failure of __gpmi_enable_clk() could lead to PM usage counter decrement. Signed-off-by: Dinghao Liu Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200522101713.24350-1-dinghao.liu@zju.edu.cn --- diff --git a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c index 630de1a..c2d4488 100644 --- a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c +++ b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c @@ -2663,7 +2663,7 @@ static int gpmi_nand_probe(struct platform_device *pdev) ret = __gpmi_enable_clk(this, true); if (ret) - goto exit_nfc_init; + goto exit_acquire_resources; pm_runtime_set_autosuspend_delay(&pdev->dev, 500); pm_runtime_use_autosuspend(&pdev->dev);