alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: broonie@kernel.org
Cc: patches@opensource.cirrus.com, alsa-devel@alsa-project.org,
	lgirdwood@gmail.com
Subject: [PATCH 2/7] ASoC: dapm: Don't fail creating new DAPM control on NULL pinctrl
Date: Tue, 28 Aug 2018 14:35:03 +0100	[thread overview]
Message-ID: <20180828133508.13012-2-ckeepax@opensource.cirrus.com> (raw)
In-Reply-To: <20180828133508.13012-1-ckeepax@opensource.cirrus.com>

devm_pinctrl_get will only return NULL in the case that pinctrl
is not built into the kernel and all the pinctrl functions used
by the DAPM core are appropriately stubbed for that case. There
is no need to error out of snd_soc_dapm_new_control_unlocked
if pinctrl isn't built into the kernel, so change the
IS_ERR_OR_NULL to just an IS_ERR.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---
 sound/soc/soc-dapm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 78ab6965af55..d7be3981f026 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -3487,7 +3487,7 @@ snd_soc_dapm_new_control_unlocked(struct snd_soc_dapm_context *dapm,
 		break;
 	case snd_soc_dapm_pinctrl:
 		w->pinctrl = devm_pinctrl_get(dapm->dev);
-		if (IS_ERR_OR_NULL(w->pinctrl)) {
+		if (IS_ERR(w->pinctrl)) {
 			ret = PTR_ERR(w->pinctrl);
 			if (ret == -EPROBE_DEFER)
 				return ERR_PTR(ret);
-- 
2.11.0

  reply	other threads:[~2018-08-28 13:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-28 13:35 [PATCH 1/7] ASoC: dapm: Remove clock framework ifdefs Charles Keepax
2018-08-28 13:35 ` Charles Keepax [this message]
2018-08-28 20:48   ` Applied "ASoC: dapm: Don't fail creating new DAPM control on NULL pinctrl" to the asoc tree Mark Brown
2018-08-28 13:35 ` [PATCH 3/7] ASoC: dapm: Move error handling to snd_soc_dapm_new_control_unlocked Charles Keepax
2018-08-28 18:28   ` Mark Brown
2018-08-28 13:35 ` [PATCH 4/7] ASoC: dapm: Cosmetic tidy up of snd_soc_dapm_new_control Charles Keepax
2018-08-28 13:35 ` [PATCH 5/7] ASoC: dapm: Move connection of CODEC to CODEC DAIs Charles Keepax
2018-08-28 13:35 ` [PATCH 6/7] ASoC: dapm: Add support for multi-CODEC CODEC to CODEC links Charles Keepax
2018-08-28 13:35 ` [PATCH 7/7] ASoC: dapm: Move CODEC to CODEC params from the widget to the runtime Charles Keepax
2018-08-28 20:49 ` Applied "ASoC: dapm: Remove clock framework ifdefs" to the asoc tree Mark Brown

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=20180828133508.13012-2-ckeepax@opensource.cirrus.com \
    --to=ckeepax@opensource.cirrus.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=patches@opensource.cirrus.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).