Skip to content

Commit f643373

Browse files
charleskeepaxgregkh
authored andcommitted
ASoC: SDCA: Fix return value in sdca_regmap_mbq_size()
[ Upstream commit f81e630 ] The MBQ size function returns an integer representing the size of a Control. Currently if the Control is not found the function will return false which makes little sense. Correct this typo to return -EINVAL. Fixes: e3f7caf ("ASoC: SDCA: Add generic regmap SDCA helpers") Signed-off-by: Charles Keepax <[email protected]> Message-ID: <[email protected]> Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 9ff967d commit f643373

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sound/soc/sdca/sdca_regmap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ int sdca_regmap_mbq_size(struct sdca_function_data *function, unsigned int reg)
196196

197197
control = function_find_control(function, reg);
198198
if (!control)
199-
return false;
199+
return -EINVAL;
200200

201201
return clamp_val(control->nbits / BITS_PER_BYTE, sizeof(u8), sizeof(u32));
202202
}

0 commit comments

Comments
 (0)