From: Dan Carpenter Date: Wed, 19 Sep 2012 06:27:00 +0000 (+0100) Subject: iio: dac/ad5755: signedness bug in ad5755_setup_pdata() X-Git-Tag: upstream/snapshot3+hdmi~6593^2~50^2~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=369d0e20138c774e4c0c07ca1572e412207bc3fc;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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: Dan Carpenter Acked-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/dac/ad5755.c b/drivers/iio/dac/ad5755.c index e6dbe5f..5db3506 100644 --- a/drivers/iio/dac/ad5755.c +++ b/drivers/iio/dac/ad5755.c @@ -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 ||