mtd: nand: brcmnand: Change BUG_ON in brcmnand_send_cmd
authorFlorian Fainelli <f.fainelli@gmail.com>
Fri, 8 Jul 2016 17:36:39 +0000 (10:36 -0700)
committerBrian Norris <computersforpeace@gmail.com>
Sun, 17 Jul 2016 03:40:16 +0000 (20:40 -0700)
Change the BUG_ON() condition in brcmnand_send_cmd() which checks for
the interrupt status "controller ready" bit to a WARN_ON.

There is no good reason to kill the system when this condition occur
because we could have systems which listed the NAND controller as
available (e.g: from Device Tree), but the NAND chip could be
malfunctioning and not responding.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Kamal Dasu <kdasu.kdev@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/nand/brcmnand/brcmnand.c

index faca01d6e0f92a7fdd020915c9afd3f45a711e77..8eb2c64df38c333c3da874cac51b9695ac534de8 100644 (file)
@@ -1165,7 +1165,7 @@ static void brcmnand_send_cmd(struct brcmnand_host *host, int cmd)
        ctrl->cmd_pending = cmd;
 
        intfc = brcmnand_read_reg(ctrl, BRCMNAND_INTFC_STATUS);
-       BUG_ON(!(intfc & INTFC_CTLR_READY));
+       WARN_ON(!(intfc & INTFC_CTLR_READY));
 
        mb(); /* flush previous writes */
        brcmnand_write_reg(ctrl, BRCMNAND_CMD_START,