Skip to content

Commit

Permalink
mtd: hyperbus: Add proper error message for missing compatible
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dirk Behme authored and Vignesh Raghavendra committed Mar 3, 2020
1 parent 11a48a5 commit cb6176e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/mtd/hyperbus/hyperbus-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit cb6176e

Please sign in to comment.