From: Dirk Behme Date: Tue, 4 Feb 2020 07:10:43 +0000 (+0100) Subject: mtd: hyperbus: Add proper error message for missing compatible X-Git-Tag: v5.7-rc1~113^2~3^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cb6176ef25cef7a54ac1e8701f9dde822fce5cee;p=thirdparty%2Flinux.git mtd: hyperbus: Add proper error message for missing compatible In case the compatible "cypress,hyperflash" is not given output a proper error message. Signed-off-by: Dirk Behme Signed-off-by: Vignesh Raghavendra --- diff --git a/drivers/mtd/hyperbus/hyperbus-core.c b/drivers/mtd/hyperbus/hyperbus-core.c index 6af9ea34117de..c1916cca1701b 100644 --- a/drivers/mtd/hyperbus/hyperbus-core.c +++ b/drivers/mtd/hyperbus/hyperbus-core.c @@ -73,8 +73,10 @@ int hyperbus_register_device(struct hyperbus_device *hbdev) np = hbdev->np; ctlr = hbdev->ctlr; - if (!of_device_is_compatible(np, "cypress,hyperflash")) + if (!of_device_is_compatible(np, "cypress,hyperflash")) { + dev_err(ctlr->dev, "\"cypress,hyperflash\" compatible missing\n"); return -ENODEV; + } hbdev->memtype = HYPERFLASH;