public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iio:prox:sx9500 trivial simplification of return path in init function.
@ 2015-05-02 10:29 Jonathan Cameron
  2015-05-04  9:13 ` Vlad Dogaru
  2015-05-04  9:22 ` Daniel Baluta
  0 siblings, 2 replies; 5+ messages in thread
From: Jonathan Cameron @ 2015-05-02 10:29 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Vlad Dogaru

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Vlad Dogaru <vlad.dogaru@intel.com>
---
 drivers/iio/proximity/sx9500.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/iio/proximity/sx9500.c b/drivers/iio/proximity/sx9500.c
index f1e9d734b6b6..323de9510ba5 100644
--- a/drivers/iio/proximity/sx9500.c
+++ b/drivers/iio/proximity/sx9500.c
@@ -860,10 +860,8 @@ static int sx9500_init_device(struct iio_dev *indio_dev)
 	}
 
 	ret = sx9500_init_compensation(indio_dev);
-	if (ret < 0)
-		return ret;
 
-	return 0;
+	return ret;
 }
 
 static void sx9500_gpio_probe(struct i2c_client *client,
-- 
2.3.5

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

* Re: [PATCH] iio:prox:sx9500 trivial simplification of return path in init function.
  2015-05-02 10:29 [PATCH] iio:prox:sx9500 trivial simplification of return path in init function Jonathan Cameron
@ 2015-05-04  9:13 ` Vlad Dogaru
  2015-05-04  9:22 ` Daniel Baluta
  1 sibling, 0 replies; 5+ messages in thread
From: Vlad Dogaru @ 2015-05-04  9:13 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: linux-iio

On Sat, May 02, 2015 at 11:29:42AM +0100, Jonathan Cameron wrote:
> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
> Reported-by: kbuild test robot <fengguang.wu@intel.com>
> Cc: Vlad Dogaru <vlad.dogaru@intel.com>
> ---
>  drivers/iio/proximity/sx9500.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)

Not sure if changes like this need a review, but this looks good to me.

> diff --git a/drivers/iio/proximity/sx9500.c b/drivers/iio/proximity/sx9500.c
> index f1e9d734b6b6..323de9510ba5 100644
> --- a/drivers/iio/proximity/sx9500.c
> +++ b/drivers/iio/proximity/sx9500.c
> @@ -860,10 +860,8 @@ static int sx9500_init_device(struct iio_dev *indio_dev)
>  	}
>  
>  	ret = sx9500_init_compensation(indio_dev);
> -	if (ret < 0)
> -		return ret;
>  
> -	return 0;
> +	return ret;
>  }
>  
>  static void sx9500_gpio_probe(struct i2c_client *client,
> -- 
> 2.3.5
> 

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

* Re: [PATCH] iio:prox:sx9500 trivial simplification of return path in init function.
  2015-05-02 10:29 [PATCH] iio:prox:sx9500 trivial simplification of return path in init function Jonathan Cameron
  2015-05-04  9:13 ` Vlad Dogaru
@ 2015-05-04  9:22 ` Daniel Baluta
  2015-05-04  9:38   ` Jonathan Cameron
  1 sibling, 1 reply; 5+ messages in thread
From: Daniel Baluta @ 2015-05-04  9:22 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: linux-iio@vger.kernel.org, Vlad Dogaru

On Sat, May 2, 2015 at 1:29 PM, Jonathan Cameron <jic23@kernel.org> wrote:
> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
> Reported-by: kbuild test robot <fengguang.wu@intel.com>
> Cc: Vlad Dogaru <vlad.dogaru@intel.com>
> ---
>  drivers/iio/proximity/sx9500.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/iio/proximity/sx9500.c b/drivers/iio/proximity/sx9500.c
> index f1e9d734b6b6..323de9510ba5 100644
> --- a/drivers/iio/proximity/sx9500.c
> +++ b/drivers/iio/proximity/sx9500.c
> @@ -860,10 +860,8 @@ static int sx9500_init_device(struct iio_dev *indio_dev)
>         }
>
>         ret = sx9500_init_compensation(indio_dev);
> -       if (ret < 0)
> -               return ret;
>
> -       return 0;
> +       return ret;
>  }

Or, better directly return sx9500_init_comp...

Daniel.

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

* Re: [PATCH] iio:prox:sx9500 trivial simplification of return path in init function.
  2015-05-04  9:22 ` Daniel Baluta
@ 2015-05-04  9:38   ` Jonathan Cameron
  2015-05-04 10:30     ` Jonathan Cameron
  0 siblings, 1 reply; 5+ messages in thread
From: Jonathan Cameron @ 2015-05-04  9:38 UTC (permalink / raw)
  To: Daniel Baluta; +Cc: linux-iio@vger.kernel.org, Vlad Dogaru

On 04/05/15 10:22, Daniel Baluta wrote:
> On Sat, May 2, 2015 at 1:29 PM, Jonathan Cameron <jic23@kernel.org> wrote:
>> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
>> Reported-by: kbuild test robot <fengguang.wu@intel.com>
>> Cc: Vlad Dogaru <vlad.dogaru@intel.com>
>> ---
>>  drivers/iio/proximity/sx9500.c | 4 +---
>>  1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/drivers/iio/proximity/sx9500.c b/drivers/iio/proximity/sx9500.c
>> index f1e9d734b6b6..323de9510ba5 100644
>> --- a/drivers/iio/proximity/sx9500.c
>> +++ b/drivers/iio/proximity/sx9500.c
>> @@ -860,10 +860,8 @@ static int sx9500_init_device(struct iio_dev *indio_dev)
>>         }
>>
>>         ret = sx9500_init_compensation(indio_dev);
>> -       if (ret < 0)
>> -               return ret;
>>
>> -       return 0;
>> +       return ret;
>>  }
> 
> Or, better directly return sx9500_init_comp...
oops. Good point ;)
> 
> Daniel.
> --
> 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] 5+ messages in thread

* Re: [PATCH] iio:prox:sx9500 trivial simplification of return path in init function.
  2015-05-04  9:38   ` Jonathan Cameron
@ 2015-05-04 10:30     ` Jonathan Cameron
  0 siblings, 0 replies; 5+ messages in thread
From: Jonathan Cameron @ 2015-05-04 10:30 UTC (permalink / raw)
  To: Daniel Baluta; +Cc: linux-iio@vger.kernel.org, Vlad Dogaru

On 04/05/15 10:38, Jonathan Cameron wrote:
> On 04/05/15 10:22, Daniel Baluta wrote:
>> On Sat, May 2, 2015 at 1:29 PM, Jonathan Cameron <jic23@kernel.org> wrote:
>>> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
>>> Reported-by: kbuild test robot <fengguang.wu@intel.com>
>>> Cc: Vlad Dogaru <vlad.dogaru@intel.com>
>>> ---
>>>  drivers/iio/proximity/sx9500.c | 4 +---
>>>  1 file changed, 1 insertion(+), 3 deletions(-)
>>>
>>> diff --git a/drivers/iio/proximity/sx9500.c b/drivers/iio/proximity/sx9500.c
>>> index f1e9d734b6b6..323de9510ba5 100644
>>> --- a/drivers/iio/proximity/sx9500.c
>>> +++ b/drivers/iio/proximity/sx9500.c
>>> @@ -860,10 +860,8 @@ static int sx9500_init_device(struct iio_dev *indio_dev)
>>>         }
>>>
>>>         ret = sx9500_init_compensation(indio_dev);
>>> -       if (ret < 0)
>>> -               return ret;
>>>
>>> -       return 0;
>>> +       return ret;
>>>  }
>>
>> Or, better directly return sx9500_init_comp...
> oops. Good point ;)
Applied with the entirely obvious change that I'd missed and Vlad hadn't
noticed made!

Btw Vlad, this is why even stupidly simple patches ideally get a review.
Often they have the silliest mistakes in them.

Thanks All,

I'm travelling for a few days so not sure when I'll push out my local
tree.
>>
>> Daniel.
>> --
>> 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] 5+ messages in thread

end of thread, other threads:[~2015-05-04 16:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-02 10:29 [PATCH] iio:prox:sx9500 trivial simplification of return path in init function Jonathan Cameron
2015-05-04  9:13 ` Vlad Dogaru
2015-05-04  9:22 ` Daniel Baluta
2015-05-04  9:38   ` Jonathan Cameron
2015-05-04 10:30     ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox