Commit 369d0e20 authored by Dan Carpenter's avatar Dan Carpenter Committed by Jonathan Cameron

iio: dac/ad5755: signedness bug in ad5755_setup_pdata()

We need "ret" to be signed for the error handling to work correctly.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent f07b60b7
...@@ -451,9 +451,9 @@ static int __devinit ad5755_setup_pdata(struct iio_dev *indio_dev, ...@@ -451,9 +451,9 @@ static int __devinit ad5755_setup_pdata(struct iio_dev *indio_dev,
const struct ad5755_platform_data *pdata) const struct ad5755_platform_data *pdata)
{ {
struct ad5755_state *st = iio_priv(indio_dev); struct ad5755_state *st = iio_priv(indio_dev);
unsigned int ret;
unsigned int val; unsigned int val;
unsigned int i; unsigned int i;
int ret;
if (pdata->dc_dc_phase > AD5755_DC_DC_PHASE_90_DEGREE || if (pdata->dc_dc_phase > AD5755_DC_DC_PHASE_90_DEGREE ||
pdata->dc_dc_freq > AD5755_DC_DC_FREQ_650kHZ || pdata->dc_dc_freq > AD5755_DC_DC_FREQ_650kHZ ||
......
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