From: Ladislav Michl <ladis@linux-mips.org>
To: alsa-devel@alsa-project.org
Cc: Mark Brown <broonie@kernel.org>,
Alexandre Belloni <alexandre.belloni@free-electrons.com>,
Nicolas Ferre <nicolas.ferre@microchip.com>
Subject: [PATCH v2] ASoC: atmel: Remove redundant dev_err() call in probe function
Date: Thu, 1 Mar 2018 14:37:31 +0100 [thread overview]
Message-ID: <20180301133731.GA30722@lenoch> (raw)
There is an error message within devm_ioremap_resource already,
so remove the redundant dev_err() call.
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
---
Changes:
- v2: None, just added Ack.
sound/soc/atmel/atmel-classd.c | 7 ++-----
sound/soc/atmel/atmel-pdmic.c | 7 ++-----
2 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/sound/soc/atmel/atmel-classd.c b/sound/soc/atmel/atmel-classd.c
index 9baaf6bc5fbd..3d70061901a0 100644
--- a/sound/soc/atmel/atmel-classd.c
+++ b/sound/soc/atmel/atmel-classd.c
@@ -583,11 +583,8 @@ static int atmel_classd_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
io_base = devm_ioremap_resource(dev, res);
- if (IS_ERR(io_base)) {
- ret = PTR_ERR(io_base);
- dev_err(dev, "failed to remap register memory: %d\n", ret);
- return ret;
- }
+ if (IS_ERR(io_base))
+ return PTR_ERR(io_base);
dd->phy_base = res->start;
dd->dev = dev;
diff --git a/sound/soc/atmel/atmel-pdmic.c b/sound/soc/atmel/atmel-pdmic.c
index 94f852574a44..915c2b064de1 100644
--- a/sound/soc/atmel/atmel-pdmic.c
+++ b/sound/soc/atmel/atmel-pdmic.c
@@ -633,11 +633,8 @@ static int atmel_pdmic_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
io_base = devm_ioremap_resource(dev, res);
- if (IS_ERR(io_base)) {
- ret = PTR_ERR(io_base);
- dev_err(dev, "failed to remap register memory: %d\n", ret);
- return ret;
- }
+ if (IS_ERR(io_base))
+ return PTR_ERR(io_base);
dd->phy_base = res->start;
--
2.16.2
next reply other threads:[~2018-03-01 13:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-01 13:37 Ladislav Michl [this message]
2018-03-01 13:42 ` [PATCH v2] ASoC: atmel: Remove redundant dev_err() call in probe function Alexandre Belloni
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=20180301133731.GA30722@lenoch \
--to=ladis@linux-mips.org \
--cc=alexandre.belloni@free-electrons.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=nicolas.ferre@microchip.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.