From: Dirk Behme <dirk.behme@de.bosch.com>
To: <sergei.shtylyov@cogentembedded.com>, <vigneshr@ti.com>,
<linux-mtd@lists.infradead.org>
Cc: dirk.behme@de.bosch.com
Subject: [PATCH] mtd: hyperbus: Add proper error message for missing compatible
Date: Mon, 3 Feb 2020 08:55:31 +0100 [thread overview]
Message-ID: <20200203075531.3739-1-dirk.behme@de.bosch.com> (raw)
In case the compatible "cypress,hyperflash" is not given
output a proper error message. Do it the same way as some
lines above.
Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com>
---
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..61b0f686a6dc 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")) {
+ pr_err("hyperbus: '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/
next reply other threads:[~2020-02-03 8:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-03 7:55 Dirk Behme [this message]
2020-02-03 18:37 ` [PATCH] mtd: hyperbus: Add proper error message for missing compatible Sergei Shtylyov
2020-02-04 4:46 ` Vignesh Raghavendra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200203075531.3739-1-dirk.behme@de.bosch.com \
--to=dirk.behme@de.bosch.com \
--cc=linux-mtd@lists.infradead.org \
--cc=sergei.shtylyov@cogentembedded.com \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).