iio: dac/ad5755: signedness bug in ad5755_setup_pdata()
Subsystems (3)
PATCH 1/1 iio: dac/ad5755: signedness bug in ad5755_setup_pdata()
We need "ret" to be signed for the error handling to work correctly.
drivers/iio/dac/ad5755.c +1 -1
@@ -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 ||
Quoted 3 lines · Dan Carpenter
We need "ret" to be signed for the error handling to work correctly.
Signed-off-by Dan Carpenter <[email protected]>
Thanks,
Quoted 20 lines
drivers/iio/dac/ad5755.c +1
-2@@ -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 || --To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Jonathan Cameron
maintainerQuoted 8 lines · Lars-Peter Clausen
Quoted 3 lines · Dan Carpenter
We need "ret" to be signed for the error handling to work correctly.
Signed-off-by Dan Carpenter <[email protected]>Thanks,
Add to togreg branch of iio.git
Thanks
Quoted 27 lines
Quoted 18 lines
drivers/iio/dac/ad5755.c +1
-2@@ -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 || --Quoted 3 lines
To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html