summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorCharles Keepax <ckeepax@opensource.cirrus.com>2018-08-28 16:35:03 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-11-20 20:45:32 +0300
commitac66c0c470a309a14066cba756026e73edc9cd7b (patch)
treeba40d9a4d1f9be1561fd25e6797a4634f5719f00 /sound
parentd3a45d4d6f2db5d725165c5a335a8e4771a8ce08 (diff)
downloadlinux-ac66c0c470a309a14066cba756026e73edc9cd7b.tar.xz
ASoC: dapm: Don't fail creating new DAPM control on NULL pinctrl
[ Upstream commit a5cd7e9cf587f51a84b86c828b4e1c7b392f448e ] 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> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/soc-dapm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 4ce57510b623..ff31d9f9ecd6 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -3514,7 +3514,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);