浏览代码

ASoC: dapm: Don't fail creating new DAPM control on NULL pinctrl

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>
Charles Keepax 7 年之前
父节点
当前提交
a5cd7e9cf5
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      sound/soc/soc-dapm.c

+ 1 - 1
sound/soc/soc-dapm.c

@@ -3487,7 +3487,7 @@ snd_soc_dapm_new_control_unlocked(struct snd_soc_dapm_context *dapm,
 		break;
 		break;
 	case snd_soc_dapm_pinctrl:
 	case snd_soc_dapm_pinctrl:
 		w->pinctrl = devm_pinctrl_get(dapm->dev);
 		w->pinctrl = devm_pinctrl_get(dapm->dev);
-		if (IS_ERR_OR_NULL(w->pinctrl)) {
+		if (IS_ERR(w->pinctrl)) {
 			ret = PTR_ERR(w->pinctrl);
 			ret = PTR_ERR(w->pinctrl);
 			if (ret == -EPROBE_DEFER)
 			if (ret == -EPROBE_DEFER)
 				return ERR_PTR(ret);
 				return ERR_PTR(ret);