From: Stephen Boyd <swboyd@chromium.org>
To: Mark Brown <broonie@kernel.org>
Cc: linux-kernel@vger.kernel.org, Liam Girdwood <lgirdwood@gmail.com>,
Banajit Goswami <bgoswami@codeaurora.org>,
linux-arm-msm@vger.kernel.org, Patrick Lai <plai@codeaurora.org>,
alsa-devel@alsa-project.org,
V Sujith Kumar Reddy <vsujithk@codeaurora.org>,
Srinivasa Rao <srivasam@codeaurora.org>,
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
Cheng-Yi Chiang <cychiang@chromium.org>
Subject: [PATCH 4/4] ASoC: qcom: Remove duplicate error messages on ioremap
Date: Thu, 14 Jan 2021 19:43:27 -0800 [thread overview]
Message-ID: <20210115034327.617223-5-swboyd@chromium.org> (raw)
In-Reply-To: <20210115034327.617223-1-swboyd@chromium.org>
We don't need to print an error message when these ioremap operations
fail. The function that returns an error already prints an error message
and properly attributes it to the device. Drop them to save some code.
Cc: V Sujith Kumar Reddy <vsujithk@codeaurora.org>
Cc: Srinivasa Rao <srivasam@codeaurora.org>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Cheng-Yi Chiang <cychiang@chromium.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
---
sound/soc/qcom/lpass-cpu.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/sound/soc/qcom/lpass-cpu.c b/sound/soc/qcom/lpass-cpu.c
index b267fe8db3fc..0ca957dcd3fe 100644
--- a/sound/soc/qcom/lpass-cpu.c
+++ b/sound/soc/qcom/lpass-cpu.c
@@ -788,11 +788,8 @@ int asoc_qcom_lpass_cpu_platform_probe(struct platform_device *pdev)
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "lpass-lpaif");
drvdata->lpaif = devm_ioremap_resource(dev, res);
- if (IS_ERR(drvdata->lpaif)) {
- dev_err(dev, "error mapping reg resource: %ld\n",
- PTR_ERR(drvdata->lpaif));
+ if (IS_ERR(drvdata->lpaif))
return PTR_ERR(drvdata->lpaif);
- }
lpass_cpu_regmap_config.max_register = LPAIF_WRDMAPER_REG(variant,
variant->wrdma_channels +
@@ -810,11 +807,8 @@ int asoc_qcom_lpass_cpu_platform_probe(struct platform_device *pdev)
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "lpass-hdmiif");
drvdata->hdmiif = devm_ioremap_resource(dev, res);
- if (IS_ERR(drvdata->hdmiif)) {
- dev_err(dev, "error mapping reg resource: %ld\n",
- PTR_ERR(drvdata->hdmiif));
+ if (IS_ERR(drvdata->hdmiif))
return PTR_ERR(drvdata->hdmiif);
- }
lpass_hdmi_regmap_config.max_register = LPAIF_HDMI_RDMAPER_REG(variant,
variant->hdmi_rdma_channels);
--
https://chromeos.dev
next prev parent reply other threads:[~2021-01-15 3:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-15 3:43 [PATCH 0/4] ASoC: qcom: Minor code cleanups for lpass-cpu Stephen Boyd
2021-01-15 3:43 ` [PATCH 1/4] ASoC: qcom: Remove useless debug print Stephen Boyd
2021-01-15 3:43 ` [PATCH 2/4] ASoC: qcom: Add some names to regmap configs Stephen Boyd
2021-01-15 3:43 ` [PATCH 3/4] ASoC: qcom: Stop casting away __iomem for error pointers Stephen Boyd
2021-01-15 3:43 ` Stephen Boyd [this message]
2021-01-15 11:12 ` [PATCH 0/4] ASoC: qcom: Minor code cleanups for lpass-cpu Srinivas Kandagatla
2021-01-15 18:18 ` Mark Brown
2021-03-01 19:59 ` patchwork-bot+linux-arm-msm
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=20210115034327.617223-5-swboyd@chromium.org \
--to=swboyd@chromium.org \
--cc=alsa-devel@alsa-project.org \
--cc=bgoswami@codeaurora.org \
--cc=broonie@kernel.org \
--cc=cychiang@chromium.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=plai@codeaurora.org \
--cc=srinivas.kandagatla@linaro.org \
--cc=srivasam@codeaurora.org \
--cc=vsujithk@codeaurora.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