[PATCH] mtd: nand: orion: don't complain for probe deferral

Brian Norris computersforpeace at gmail.com
Mon May 1 17:04:54 PDT 2017


Recent patches to this driver changed the error handling for missing
clocks. Now we'll print an error if the clock causes us to defer
probing. Let's not do that.

Cc: Simon Baatz <gmbnomis at gmail.com>
Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
Compile tested only

 drivers/mtd/nand/orion_nand.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/orion_nand.c b/drivers/mtd/nand/orion_nand.c
index f8e463a97b9e..e2bfb37f11df 100644
--- a/drivers/mtd/nand/orion_nand.c
+++ b/drivers/mtd/nand/orion_nand.c
@@ -161,7 +161,8 @@ static int __init orion_nand_probe(struct platform_device *pdev)
 		if (ret == -ENOENT) {
 			info->clk = NULL;
 		} else {
-			dev_err(&pdev->dev, "failed to get clock!\n");
+			if (ret != -EPROBE_DEFER)
+				dev_err(&pdev->dev, "failed to get clock!\n");
 			return ret;
 		}
 	}
-- 
2.13.0.rc1.294.g07d810a77f-goog




More information about the linux-mtd mailing list