Skip to content

Commit cb6176e

Browse files
dirkbehmer-vignesh
authored andcommitted
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 <[email protected]> Signed-off-by: Vignesh Raghavendra <[email protected]>
1 parent 11a48a5 commit cb6176e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/mtd/hyperbus/hyperbus-core.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,10 @@ int hyperbus_register_device(struct hyperbus_device *hbdev)
7373

7474
np = hbdev->np;
7575
ctlr = hbdev->ctlr;
76-
if (!of_device_is_compatible(np, "cypress,hyperflash"))
76+
if (!of_device_is_compatible(np, "cypress,hyperflash")) {
77+
dev_err(ctlr->dev, "\"cypress,hyperflash\" compatible missing\n");
7778
return -ENODEV;
79+
}
7880

7981
hbdev->memtype = HYPERFLASH;
8082

0 commit comments

Comments
 (0)