Commit c08ae185 authored by Markus Elfring's avatar Markus Elfring Committed by Jonathan Cameron

iio-light: Use a signed return type for ltr501_match_samp_freq()

The return type "unsigned int" was used by the ltr501_match_samp_freq()
function despite of the aspect that 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: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Acked-by: default avatarPeter Meerwald-Stadler <pmeerw@pmeerw.net>
Cc: <Stable@vger.kernel.org>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent d590faf9
...@@ -180,7 +180,7 @@ static const struct ltr501_samp_table ltr501_ps_samp_table[] = { ...@@ -180,7 +180,7 @@ static const struct ltr501_samp_table ltr501_ps_samp_table[] = {
{500000, 2000000} {500000, 2000000}
}; };
static unsigned int ltr501_match_samp_freq(const struct ltr501_samp_table *tab, static int ltr501_match_samp_freq(const struct ltr501_samp_table *tab,
int len, int val, int val2) int len, int val, int val2)
{ {
int i, freq; int i, freq;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment