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

Commit fc0560b9 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ASoC: msm: Fix NULL pointer dereference"

parents 0f0c4da3 b82de7af
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
/*  Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
/*  Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -5220,11 +5220,12 @@ int voc_standby_voice_call(uint32_t session_id)
	u16 mvm_handle;
	int ret = 0;

	pr_debug("%s: voc state=%d", __func__, v->voc_state);
	if (v == NULL) {
		pr_err("%s: v is NULL\n", __func__);
		return -EINVAL;
	}
	pr_debug("%s: voc state=%d", __func__, v->voc_state);

	if (v->voc_state == VOC_RUN) {
		apr_mvm = common.apr_q6_mvm;
		if (!apr_mvm) {
@@ -5265,12 +5266,12 @@ int voc_disable_device(uint32_t session_id)
	struct voice_data *v = voice_get_session(session_id);
	int ret = 0;

	pr_debug("%s: voc state=%d\n", __func__, v->voc_state);
	if (v == NULL) {
		pr_err("%s: v is NULL\n", __func__);
		return -EINVAL;
	}

	pr_debug("%s: voc state=%d\n", __func__, v->voc_state);
	mutex_lock(&v->lock);
	if (v->voc_state == VOC_RUN) {
		ret = voice_pause_voice_call(v);
@@ -5303,12 +5304,12 @@ int voc_enable_device(uint32_t session_id)
	struct voice_data *v = voice_get_session(session_id);
	int ret = 0;

	pr_debug("%s: voc state=%d\n", __func__, v->voc_state);
	if (v == NULL) {
		pr_err("%s: v is NULL\n", __func__);
		return -EINVAL;
	}

	pr_debug("%s: voc state=%d\n", __func__, v->voc_state);
	mutex_lock(&v->lock);
	if (v->voc_state == VOC_CHANGE) {
		ret = voice_send_tty_mode_cmd(v);