]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ASoC: SDCA: Fix return value in sdca_regmap_mbq_size()
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Wed, 20 Aug 2025 16:37:15 +0000 (17:37 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Sep 2025 09:16:51 +0000 (11:16 +0200)
[ Upstream commit f81e63047600d023cbfda372b6de8f2821ff6839 ]

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: e3f7caf74b79 ("ASoC: SDCA: Add generic regmap SDCA helpers")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Message-ID: <20250820163717.1095846-2-ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/sdca/sdca_regmap.c

index c41c67c2204a41966c74687a14c3cb8516a95101..ff1f8fe2a39bb789144b8c06688c1a2896740fe8 100644 (file)
@@ -196,7 +196,7 @@ int sdca_regmap_mbq_size(struct sdca_function_data *function, unsigned int reg)
 
        control = function_find_control(function, reg);
        if (!control)
-               return false;
+               return -EINVAL;
 
        return clamp_val(control->nbits / BITS_PER_BYTE, sizeof(u8), sizeof(u32));
 }