Commit cb6176ef authored by Dirk Behme's avatar Dirk Behme Committed by Vignesh Raghavendra
Browse files

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: default avatarDirk Behme <dirk.behme@de.bosch.com>
Signed-off-by: default avatarVignesh Raghavendra <vigneshr@ti.com>
parent 11a48a5a
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -73,8 +73,10 @@ int hyperbus_register_device(struct hyperbus_device *hbdev)


	np = hbdev->np;
	np = hbdev->np;
	ctlr = hbdev->ctlr;
	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;
		return -ENODEV;
	}


	hbdev->memtype = HYPERFLASH;
	hbdev->memtype = HYPERFLASH;