ASoC: ssm2518: Use a signed return type for ssm2518_lookup_mcs()
authorMarkus Elfring <elfring@users.sourceforge.net>
Sun, 20 Dec 2015 09:34:25 +0000 (10:34 +0100)
committerMark Brown <broonie@kernel.org>
Tue, 22 Dec 2015 23:59:25 +0000 (23:59 +0000)
The return type "unsigned int" was used by the ssm2518_lookup_mcs()
function even though it will eventually return a negative error code.
Improve this implementation detail by deletion of the type modifier then.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/ssm2518.c

index 86b81a60ac52bb4750da5981d62a210815d515c4..e2e0bfa7ec20f9df40a3e4385e3edf44e3f0d15d 100644 (file)
@@ -309,7 +309,7 @@ static const struct snd_pcm_hw_constraint_list ssm2518_constraints_12288000 = {
        .count = ARRAY_SIZE(ssm2518_rates_12288000),
 };
 
-static unsigned int ssm2518_lookup_mcs(struct ssm2518 *ssm2518,
+static int ssm2518_lookup_mcs(struct ssm2518 *ssm2518,
        unsigned int rate)
 {
        const unsigned int *sysclks = NULL;