From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932396AbcHOPNG (ORCPT ); Mon, 15 Aug 2016 11:13:06 -0400 Received: from saturn.retrosnub.co.uk ([178.18.118.26]:41414 "EHLO saturn.retrosnub.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752713AbcHOPND (ORCPT ); Mon, 15 Aug 2016 11:13:03 -0400 Subject: Re: [PATCH] iio: light: us5182d: Add missing error code assignment before test To: Christophe JAILLET , knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net References: <1470806296-8739-1-git-send-email-christophe.jaillet@wanadoo.fr> Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org From: Jonathan Cameron Message-ID: Date: Mon, 15 Aug 2016 16:13:00 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <1470806296-8739-1-git-send-email-christophe.jaillet@wanadoo.fr> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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; > } >