diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2015-12-19 08:14:54 -0500 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2015-12-19 12:00:29 -0500 |
commit | c08ae18560aaed50fed306a2e11f36ce70130f65 (patch) | |
tree | 6f5357df2c26eb976a3f5930bfec828cfa7f8909 | |
parent | d590faf9e8f8509a0a0aa79c38e87fcc6b913248 (diff) |
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: Markus Elfring <elfring@users.sourceforge.net>
Acked-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-rw-r--r-- | drivers/iio/light/ltr501.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/light/ltr501.c b/drivers/iio/light/ltr501.c index 809a961b9a7f..6bf89d8f3741 100644 --- a/drivers/iio/light/ltr501.c +++ b/drivers/iio/light/ltr501.c | |||
@@ -180,7 +180,7 @@ static const struct ltr501_samp_table ltr501_ps_samp_table[] = { | |||
180 | {500000, 2000000} | 180 | {500000, 2000000} |
181 | }; | 181 | }; |
182 | 182 | ||
183 | static unsigned int ltr501_match_samp_freq(const struct ltr501_samp_table *tab, | 183 | static int ltr501_match_samp_freq(const struct ltr501_samp_table *tab, |
184 | int len, int val, int val2) | 184 | int len, int val, int val2) |
185 | { | 185 | { |
186 | int i, freq; | 186 | int i, freq; |