mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 08:02:27 +02:00
iio: adc: ad4851: Fix signedness bug in ad4851_calibrate()
The "c" variable is used to store error codes from ad4851_find_opt()
so it has to be signed for the error handling to work. Change it
to type int.
Fixes: 6250803fe2 ("iio: adc: ad4851: add ad485x driver")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Link: https://patch.msgid.link/f5e260e9-d7a8-4dae-b7ea-f1bbb1760e60@stanley.mountain
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
62c6b4f1c7
commit
eb2f9ab1f5
|
|
@ -492,11 +492,11 @@ static int ad4851_find_opt(const unsigned long *field, unsigned int start,
|
|||
static int ad4851_calibrate(struct iio_dev *indio_dev)
|
||||
{
|
||||
struct ad4851_state *st = iio_priv(indio_dev);
|
||||
unsigned int opt_delay, num_lanes, delay, i, s, c;
|
||||
unsigned int opt_delay, num_lanes, delay, i, s;
|
||||
enum iio_backend_interface_type interface_type;
|
||||
DECLARE_BITMAP(pn_status, AD4851_MAX_LANES * AD4851_MAX_IODELAY);
|
||||
bool status;
|
||||
int ret;
|
||||
int c, ret;
|
||||
|
||||
ret = iio_backend_interface_type_get(st->back, &interface_type);
|
||||
if (ret)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user