diff options
author | Dirk Behme <dirk.behme@de.bosch.com> | 2020-02-04 08:10:43 +0100 |
---|---|---|
committer | Vignesh Raghavendra <vigneshr@ti.com> | 2020-03-03 10:12:39 +0530 |
commit | cb6176ef25cef7a54ac1e8701f9dde822fce5cee (patch) | |
tree | 05fe39b9caf25f2521b2bb2e3a93bdbde8615772 | |
parent | 11a48a5a18c63fd7621bb050228cebf13566e4d8 (diff) |
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 <dirk.behme@de.bosch.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
-rw-r--r-- | drivers/mtd/hyperbus/hyperbus-core.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mtd/hyperbus/hyperbus-core.c b/drivers/mtd/hyperbus/hyperbus-core.c index 6af9ea34117d..c1916cca1701 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; |