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

Commit ccff4b15 authored by Troy Kisky's avatar Troy Kisky Committed by Mark Brown
Browse files

ASoC: codec tlv320aic23 fix bogus divide by 0 message



Some code analyzer software mistakenly gives
divide by 0 error messages for these lines.
This patch will end its confusion.

Signed-off-by: default avatarTroy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent e3509ff0
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -273,14 +273,14 @@ static const unsigned short sr_valid_mask[] = {
 * Every divisor is a factor of 11*12
 */
#define SR_MULT (11*12)
#define A(x) (x) ? (SR_MULT/x) : 0
#define A(x) (SR_MULT/x)
static const unsigned char sr_adc_mult_table[] = {
	A(2), A(2), A(12), A(12),  A(0), A(0), A(3), A(1),
	A(2), A(2), A(11), A(11),  A(0), A(0), A(0), A(1)
	A(2), A(2), A(12), A(12),  0, 0, A(3), A(1),
	A(2), A(2), A(11), A(11),  0, 0, 0, A(1)
};
static const unsigned char sr_dac_mult_table[] = {
	A(2), A(12), A(2), A(12),  A(0), A(0), A(3), A(1),
	A(2), A(11), A(2), A(11),  A(0), A(0), A(0), A(1)
	A(2), A(12), A(2), A(12),  0, 0, A(3), A(1),
	A(2), A(11), A(2), A(11),  0, 0, 0, A(1)
};

static unsigned get_score(int adc, int adc_l, int adc_h, int need_adc,