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: Shiv Maliyappanahalli <smaliyap@codeaurora.org>
This commit is contained in:
parent
008f057bba
commit
e41138f310
1 changed files with 6 additions and 2 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue