From: "Rafał Miłecki" <zajec5@gmail.com>
To: Miquel Raynal <miquel.raynal@bootlin.com>,
Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>
Cc: linux-mtd@lists.infradead.org, "Rafał Miłecki" <rafal@milecki.pl>
Subject: [PATCH] mtd: core: print error code if registering NVMEM fails
Date: Fri, 17 Mar 2023 08:47:36 +0100 [thread overview]
Message-ID: <20230317074736.28944-1-zajec5@gmail.com> (raw)
From: Rafał Miłecki <rafal@milecki.pl>
It's a common practice that helps debugging problems.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
drivers/mtd/mtdcore.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
index 83a22566a8ce..8303ce62c751 100644
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -539,7 +539,8 @@ static int mtd_nvmem_add(struct mtd_info *mtd)
if (PTR_ERR(mtd->nvmem) == -EOPNOTSUPP) {
mtd->nvmem = NULL;
} else {
- dev_err(&mtd->dev, "Failed to register NVMEM device\n");
+ dev_err(&mtd->dev, "Failed to register NVMEM device: %ld\n",
+ PTR_ERR(mtd->nvmem));
return PTR_ERR(mtd->nvmem);
}
}
--
2.34.1
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next reply other threads:[~2023-03-17 7:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-17 7:47 Rafał Miłecki [this message]
2023-03-20 11:06 ` [PATCH] mtd: core: print error code if registering NVMEM fails Miquel Raynal
2023-03-20 11:21 ` Rafał Miłecki
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=20230317074736.28944-1-zajec5@gmail.com \
--to=zajec5@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=rafal@milecki.pl \
--cc=richard@nod.at \
--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