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

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

Merge "ASoC: wcd9xxx: fix out of bound access"

parents f80a75dd 5550b517
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
/*
 * Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
 * Copyright (c) 2015-2017, 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
@@ -194,7 +194,7 @@ void wcd_clsh_imped_config(struct snd_soc_codec *codec, int imped, bool reset)
		return;
	}
	index = get_impedance_index(imped);
	if (index >= ARRAY_SIZE(imped_index)) {
	if (index >= (ARRAY_SIZE(imped_index) - 1)) {
		pr_debug("%s, impedance not in range = %d\n", __func__, imped);
		return;
	}