Commit 6efadcf9 authored by Stefan Roese's avatar Stefan Roese Committed by Brian Norris

mtd: nand: fsmc: Remove BUG macros

Remove the BUG macros and return with error (if possible) instead.
Signed-off-by: default avatarStefan Roese <sr@denx.de>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
parent cbf29b83
...@@ -348,7 +348,7 @@ static void fsmc_select_chip(struct mtd_info *mtd, int chipnr) ...@@ -348,7 +348,7 @@ static void fsmc_select_chip(struct mtd_info *mtd, int chipnr)
break; break;
default: default:
BUG(); dev_err(host->dev, "unsupported chip-select %d\n", chipnr);
} }
} }
...@@ -1111,7 +1111,8 @@ static int __init fsmc_nand_probe(struct platform_device *pdev) ...@@ -1111,7 +1111,8 @@ static int __init fsmc_nand_probe(struct platform_device *pdev)
default: default:
dev_warn(&pdev->dev, "No oob scheme defined for oobsize %d\n", dev_warn(&pdev->dev, "No oob scheme defined for oobsize %d\n",
mtd->oobsize); mtd->oobsize);
BUG(); ret = -EINVAL;
goto err_probe;
} }
} else { } else {
switch (host->mtd.oobsize) { switch (host->mtd.oobsize) {
...@@ -1127,7 +1128,8 @@ static int __init fsmc_nand_probe(struct platform_device *pdev) ...@@ -1127,7 +1128,8 @@ static int __init fsmc_nand_probe(struct platform_device *pdev)
default: default:
dev_warn(&pdev->dev, "No oob scheme defined for oobsize %d\n", dev_warn(&pdev->dev, "No oob scheme defined for oobsize %d\n",
mtd->oobsize); mtd->oobsize);
BUG(); ret = -EINVAL;
goto err_probe;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment