Skip to contentSkip to conversation

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

PATCH In review Dan Carpenter 3 participants 3 messages Sep 19, 2012 – Sep 22, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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
index e6dbe5f..5db3506 100644
@@ -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 ||
Acked-by on v1 1/1
#1 lore raw
Quoted 3 lines · Dan Carpenter

We need "ret" to be signed for the error handling to work correctly.

Thanks,

Quoted 20 lines
drivers/iio/dac/ad5755.c +1 -2
index e6dbe5f..5db3506 100644
@@ -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

maintainer
#2 lore raw
Quoted 8 lines · Lars-Peter Clausen
Quoted 3 lines · Dan Carpenter

We need "ret" to be signed for the error handling to work correctly.

Thanks,

Add to togreg branch of iio.git

Thanks

Quoted 27 lines
Quoted 18 lines
drivers/iio/dac/ad5755.c +1 -2
index e6dbe5f..5db3506 100644
@@ -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