Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e41138f3 authored by Shiv Maliyappanahalli's avatar Shiv Maliyappanahalli Committed by Gerrit - the friendly Code Review server
Browse files

ASoC: codecs: fix edid error when hdmi ops is null



When edid mixer control is executed, if the hdmi ops is
not set, the mixer control get_info() returns error.
This error is treated as fatal by the caller.

Fix by returning valid mixer control info when hdmi ops
is null.

Change-Id: I0097a75d94690b199fab1adc7f2ff3faa2d82e7b
Signed-off-by: default avatarShiv Maliyappanahalli <smaliyap@codeaurora.org>
parent 008f057b
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -38,8 +38,12 @@ static int msm_hdmi_edid_ctl_info(struct snd_kcontrol *kcontrol,

	codec_data = snd_soc_codec_get_drvdata(codec);

	if (!codec_data->hdmi_ops.get_audio_edid_blk)
		return -EINVAL;
	if (!codec_data->hdmi_ops.get_audio_edid_blk) {
		pr_debug("%s: get_audio_edid_blk() is NULL\n", __func__);
		uinfo->type = SNDRV_CTL_ELEM_TYPE_BYTES;
		uinfo->count = 0;
		return 0;
	}

	rc = codec_data->hdmi_ops.get_audio_edid_blk(
			codec_data->hdmi_core_pdev,