mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 20:33:58 -04:00
asoc: codecs: add null check before access
Add null check before accessing cable status. Change-Id: I77d19f543cf56ffaa159c490ea4df1f8c5a0f272 Signed-off-by: Lakshman Chaluvaraju <lchalu@codeaurora.org>
This commit is contained in:
parent
1da5c56c8b
commit
2f778a077d
1 changed files with 3 additions and 3 deletions
|
|
@ -1,5 +1,5 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/* Copyright (c) 2012-2020, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2012-2021, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/slab.h>
|
||||
|
|
@ -222,9 +222,9 @@ static int msm_ext_disp_audio_type_get(struct snd_kcontrol *kcontrol,
|
|||
rc = msm_ext_disp_select_audio_codec(codec_data->ext_disp_core_pdev,
|
||||
&codec_info);
|
||||
|
||||
if (!codec_data->ext_disp_ops.get_audio_edid_blk ||
|
||||
if (!codec_data->ext_disp_ops.cable_status ||
|
||||
!codec_data->ext_disp_ops.get_intf_id || rc) {
|
||||
dev_err_ratelimited(component->dev, "%s: get_audio_edid_blk() or get_intf_id is NULL\n",
|
||||
dev_err_ratelimited(component->dev, "%s: cable_status() or get_intf_id is NULL\n",
|
||||
__func__);
|
||||
rc = -EINVAL;
|
||||
goto cable_err;
|
||||
|
|
|
|||
Loading…
Reference in a new issue