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

Commit 20e0f5bb authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "asoc: codecs: add null check before access"

parents 5fd51489 e7a2c47f
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
// 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(component->dev, "%s: get_audio_edid_blk() or get_intf_id is NULL\n",
		dev_err(component->dev, "%s: cable_status() or get_intf_id is NULL\n",
			__func__);
		rc = -EINVAL;
		goto cable_err;