mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <ahmad@a3f.at>
To: barebox@lists.infradead.org
Subject: [PATCH] mfd: superio: use strerrorp helper instead of open-coding
Date: Mon, 28 Oct 2019 11:12:57 +0100	[thread overview]
Message-ID: <20191028101257.31352-1-ahmad@a3f.at> (raw)

Apparently, we have a helper for strerror(-PTR_ERR(regmap)). Use it.

Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
---
 drivers/mfd/superio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/superio.c b/drivers/mfd/superio.c
index 0f08d56cb357..12d74b40f6f8 100644
--- a/drivers/mfd/superio.c
+++ b/drivers/mfd/superio.c
@@ -88,7 +88,7 @@ void superio_chip_add(struct superio_chip *siochip)
 			     &superio_regmap_config);
 	if (IS_ERR(regmap))
 		pr_warn("creating %s regmap failed: %s\n",
-			chipname, strerror(-PTR_ERR(regmap)));
+			chipname, strerrorp(regmap));
 
 	ret = regmap_register_cdev(regmap, chipname);
 	if (ret)
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2019-10-28 10:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-28 10:12 Ahmad Fatoum [this message]
2019-10-28 11:35 ` Sascha Hauer

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=20191028101257.31352-1-ahmad@a3f.at \
    --to=ahmad@a3f.at \
    --cc=barebox@lists.infradead.org \
    /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