iio: dac/ad5755: signedness bug in ad5755_setup_pdata()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 19 Sep 2012 06:27:00 +0000 (07:27 +0100)
committerJonathan Cameron <jic23@kernel.org>
Sat, 22 Sep 2012 09:09:40 +0000 (10:09 +0100)
We need "ret" to be signed for the error handling to work correctly.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/dac/ad5755.c

index e6dbe5ff7e5a3581e61239e9e8b38250af6f8d4b..5db3506034c50a7a07dad98d0634d9ab498a8bdd 100644 (file)
@@ -451,9 +451,9 @@ static int __devinit ad5755_setup_pdata(struct iio_dev *indio_dev,
        const struct ad5755_platform_data *pdata)
 {
        struct ad5755_state *st = iio_priv(indio_dev);
-       unsigned int ret;
        unsigned int val;
        unsigned int i;
+       int ret;
 
        if (pdata->dc_dc_phase > AD5755_DC_DC_PHASE_90_DEGREE ||
                pdata->dc_dc_freq > AD5755_DC_DC_FREQ_650kHZ ||