]> git.baikalelectronics.ru Git - kernel.git/commitdiff
mtd:rawnand: brcmnand: Fix PM resume crash
authorKamal Dasu <kdasu.kdev@gmail.com>
Sat, 2 May 2020 20:41:36 +0000 (16:41 -0400)
committerRichard Weinberger <richard@nod.at>
Tue, 19 May 2020 08:24:49 +0000 (10:24 +0200)
This change fixes crash observed on PM resume. This bug
was introduced in the change made for flash-edu support.

Fixes: 6f2921985287 ("mtd: rawnand: brcmnand: Add support for flash-edu for dma transfers")
Signed-off-by: Kamal Dasu <kdasu.kdev@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
drivers/mtd/nand/raw/brcmnand/brcmnand.c

index e4e3ceeac38f84b02e88fb9f9686a3a4654eb9c2..8f9ffb46a09f3ede73c6ada9df22673bcde2b264 100644 (file)
@@ -2728,9 +2728,8 @@ static int brcmnand_resume(struct device *dev)
                flash_dma_writel(ctrl, FLASH_DMA_ERROR_STATUS, 0);
        }
 
-       if (has_edu(ctrl))
+       if (has_edu(ctrl)) {
                ctrl->edu_config = edu_readl(ctrl, EDU_CONFIG);
-       else {
                edu_writel(ctrl, EDU_CONFIG, ctrl->edu_config);
                edu_readl(ctrl, EDU_CONFIG);
                brcmnand_edu_init(ctrl);