linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] iio: dac/ad5755: signedness bug in ad5755_setup_pdata()
@ 2012-09-19  6:27 Dan Carpenter
  2012-09-19 17:08 ` Lars-Peter Clausen
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2012-09-19  6:27 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: Lars-Peter Clausen, linux-iio, kernel-janitors

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

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

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 ||

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [patch] iio: dac/ad5755: signedness bug in ad5755_setup_pdata()
  2012-09-19  6:27 [patch] iio: dac/ad5755: signedness bug in ad5755_setup_pdata() Dan Carpenter
@ 2012-09-19 17:08 ` Lars-Peter Clausen
  2012-09-22  9:11   ` Jonathan Cameron
  0 siblings, 1 reply; 3+ messages in thread
From: Lars-Peter Clausen @ 2012-09-19 17:08 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Jonathan Cameron, linux-iio, kernel-janitors

On 09/19/2012 08:27 AM, Dan Carpenter wrote:
> We need "ret" to be signed for the error handling to work correctly.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Thanks,

Acked-by: Lars-Peter Clausen <lars@metafoo.de>

> 
> 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 ||
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch] iio: dac/ad5755: signedness bug in ad5755_setup_pdata()
  2012-09-19 17:08 ` Lars-Peter Clausen
@ 2012-09-22  9:11   ` Jonathan Cameron
  0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Cameron @ 2012-09-22  9:11 UTC (permalink / raw)
  To: Lars-Peter Clausen
  Cc: Dan Carpenter, Jonathan Cameron, linux-iio, kernel-janitors

On 09/19/2012 06:08 PM, Lars-Peter Clausen wrote:
> On 09/19/2012 08:27 AM, Dan Carpenter wrote:
>> We need "ret" to be signed for the error handling to work correctly.
>>
>> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> Thanks,
> 
> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Add to togreg branch of iio.git

Thanks
> 
>>
>> 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 ||
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
>> the body of a message to majordomo@vger.kernel.org
>> 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 majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-09-22  9:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-19  6:27 [patch] iio: dac/ad5755: signedness bug in ad5755_setup_pdata() Dan Carpenter
2012-09-19 17:08 ` Lars-Peter Clausen
2012-09-22  9:11   ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).