linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] mtd: hyperbus: Add proper error message for missing compatible
@ 2020-02-04  7:10 Dirk Behme
  2020-03-13  5:21 ` Vignesh Raghavendra
  0 siblings, 1 reply; 2+ messages in thread
From: Dirk Behme @ 2020-02-04  7:10 UTC (permalink / raw)
  To: sergei.shtylyov, vigneshr, linux-mtd; +Cc: dirk.behme

In case the compatible "cypress,hyperflash" is not given
output a proper error message.

Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com>
---
Changes in v2: Use dev_err and '"'

 drivers/mtd/hyperbus/hyperbus-core.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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;
 
-- 
2.20.0


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] mtd: hyperbus: Add proper error message for missing compatible
  2020-02-04  7:10 [PATCH v2] mtd: hyperbus: Add proper error message for missing compatible Dirk Behme
@ 2020-03-13  5:21 ` Vignesh Raghavendra
  0 siblings, 0 replies; 2+ messages in thread
From: Vignesh Raghavendra @ 2020-03-13  5:21 UTC (permalink / raw)
  To: Dirk Behme, sergei.shtylyov, linux-mtd



On 04/02/20 12:40 pm, Dirk Behme wrote:
> In case the compatible "cypress,hyperflash" is not given
> output a proper error message.
> 
> Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com>

Thanks!

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git cfi/next

Regards
Vignesh

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-13  5:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-04  7:10 [PATCH v2] mtd: hyperbus: Add proper error message for missing compatible Dirk Behme
2020-03-13  5:21 ` Vignesh Raghavendra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).