Home
last modified time | relevance | path

Searched hist:"7 d87b3c5c8602df4ce6d615b33ae6dc15438fa29" (Results 1 – 1 of 1) sorted by relevance

/linux/drivers/iio/light/
H A Dtsl4531.cdiff 7d87b3c5c8602df4ce6d615b33ae6dc15438fa29 Tue Aug 18 11:16:33 CEST 2015 Dan Carpenter <dan.carpenter@oracle.com> iio: tsl4531: fix error handling in tsl4531_check_id()

The tsl4531_check_id() function returned 1 on "found" and 0 on "not
found" and negative error codes on failure. This was non-standard and
bug prone. The caller treated all non-zero values including error codes
as "found".

This patch fixes it by changing the tsl4531_check_id() to return zero on
success or a negative error code, and updates the caller.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>