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

Commit ef253d7f 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: qdsp6v2: avoid setting DTS HPX param on invalid copp"

parents a4698ea1 9aa03b07
Loading
Loading
Loading
Loading
+15 −3
Original line number Original line 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
 * 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
 * it under the terms of the GNU General Public License version 2 and
@@ -238,8 +238,14 @@ int adm_dts_eagle_set(int port_id, int copp_idx, int param_id,
		__func__, port_id, p_idx);
		__func__, port_id, p_idx);


	if (p_idx < 0) {
	if (p_idx < 0) {
		pr_err("DTS_EAGLE_ADM: %s - invalid port index %i, port id %i, copp idx %i\n",
		pr_err("DTS_EAGLE_ADM: %s: invalid port index 0x%x, port id 0x%x\n",
			__func__, p_idx, port_id, copp_idx);
			__func__, p_idx, port_id);
		return -EINVAL;
	}

	if (copp_idx < 0 || copp_idx >= MAX_COPPS_PER_PORT) {
		pr_err("DTS_EAGLE_ADM: %s: Invalid copp_idx: %d\n", __func__,
			copp_idx);
		return -EINVAL;
		return -EINVAL;
	}
	}


@@ -323,6 +329,12 @@ int adm_dts_eagle_get(int port_id, int copp_idx, int param_id,
		return -EINVAL;
		return -EINVAL;
	}
	}


	if (copp_idx < 0 || copp_idx >= MAX_COPPS_PER_PORT) {
		pr_err("DTS_EAGLE_ADM: %s: Invalid copp_idx: %d\n", __func__,
			copp_idx);
		return -EINVAL;
	}

	if (size <= 0 || !data) {
	if (size <= 0 || !data) {
		pr_err("DTS_EAGLE_ADM: %s - invalid size %i or pointer %p.\n",
		pr_err("DTS_EAGLE_ADM: %s - invalid size %i or pointer %p.\n",
			__func__, size, data);
			__func__, size, data);