public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iio: light: us5182d: Add missing error code assignment before test
@ 2016-08-10  5:18 Christophe JAILLET
  2016-08-15 15:13 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2016-08-10  5:18 UTC (permalink / raw)
  To: jic23, knaack.h, lars, pmeerw
  Cc: linux-iio, linux-kernel, kernel-janitors, Christophe JAILLET

It is likely that checking the result of 'pm_runtime_set_active' is
expected here.

Fixes: f0e5f57d3ac2 ("iio: light: us8152d: Add power management support")

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/iio/light/us5182d.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/light/us5182d.c b/drivers/iio/light/us5182d.c
index 20c40f780964..18cf2e29e4d5 100644
--- a/drivers/iio/light/us5182d.c
+++ b/drivers/iio/light/us5182d.c
@@ -894,7 +894,7 @@ static int us5182d_probe(struct i2c_client *client,
 		goto out_err;
 
 	if (data->default_continuous) {
-		pm_runtime_set_active(&client->dev);
+		ret = pm_runtime_set_active(&client->dev);
 		if (ret < 0)
 			goto out_err;
 	}
-- 
2.7.4


---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus


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

* Re: [PATCH] iio: light: us5182d: Add missing error code assignment before test
  2016-08-10  5:18 [PATCH] iio: light: us5182d: Add missing error code assignment before test Christophe JAILLET
@ 2016-08-15 15:13 ` Jonathan Cameron
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2016-08-15 15:13 UTC (permalink / raw)
  To: Christophe JAILLET, knaack.h, lars, pmeerw
  Cc: linux-iio, linux-kernel, kernel-janitors

On 10/08/16 06:18, Christophe JAILLET wrote:
> It is likely that checking the result of 'pm_runtime_set_active' is
> expected here.
> 
> Fixes: f0e5f57d3ac2 ("iio: light: us8152d: Add power management support")
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Applied to the togreg branch of iio.git. Initially pushed out as testing
for the autobuilders to play with it.

Whilst the fix is obviously correct, the missing assignment just results in
a particular error not being handled rather than a 'bug' as such. Hence
I'm sending this the slow route and it'll hit in the next merge window.

Thanks,

Jonathan
> ---
>  drivers/iio/light/us5182d.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/light/us5182d.c b/drivers/iio/light/us5182d.c
> index 20c40f780964..18cf2e29e4d5 100644
> --- a/drivers/iio/light/us5182d.c
> +++ b/drivers/iio/light/us5182d.c
> @@ -894,7 +894,7 @@ static int us5182d_probe(struct i2c_client *client,
>  		goto out_err;
>  
>  	if (data->default_continuous) {
> -		pm_runtime_set_active(&client->dev);
> +		ret = pm_runtime_set_active(&client->dev);
>  		if (ret < 0)
>  			goto out_err;
>  	}
> 


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

end of thread, other threads:[~2016-08-15 15:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-10  5:18 [PATCH] iio: light: us5182d: Add missing error code assignment before test Christophe JAILLET
2016-08-15 15:13 ` Jonathan Cameron

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