* [PATCH -next] iio: pressure: bmp280: fix wrong pointer passed to PTR_ERR()
[not found] <1468487141-20016-1-git-send-email-weiyj_lk@163.com>
@ 2016-07-14 11:06 ` weiyj_lk
2016-07-22 13:10 ` Linus Walleij
0 siblings, 1 reply; 3+ messages in thread
From: weiyj_lk @ 2016-07-14 11:06 UTC (permalink / raw)
To: Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
Peter Meerwald-Stadler, Linus Walleij
Cc: Wei Yongjun, linux-iio
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
PTR_ERR should access the value just tested by IS_ERR, otherwise
the wrong error code will be returned.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
drivers/iio/pressure/bmp280-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/pressure/bmp280-core.c b/drivers/iio/pressure/bmp280-core.c
index 6943688..94e27b2 100644
--- a/drivers/iio/pressure/bmp280-core.c
+++ b/drivers/iio/pressure/bmp280-core.c
@@ -970,7 +970,7 @@ int bmp280_common_probe(struct device *dev,
data->vdda = devm_regulator_get(dev, "vdda");
if (IS_ERR(data->vdda)) {
dev_err(dev, "failed to get VDDA regulator\n");
- ret = PTR_ERR(data->vddd);
+ ret = PTR_ERR(data->vdda);
goto out_disable_vddd;
}
ret = regulator_enable(data->vdda);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] iio: pressure: bmp280: fix wrong pointer passed to PTR_ERR()
2016-07-14 11:06 ` [PATCH -next] iio: pressure: bmp280: fix wrong pointer passed to PTR_ERR() weiyj_lk
@ 2016-07-22 13:10 ` Linus Walleij
2016-07-23 6:45 ` Jonathan Cameron
0 siblings, 1 reply; 3+ messages in thread
From: Linus Walleij @ 2016-07-22 13:10 UTC (permalink / raw)
To: weiyj_lk, Jonathan Cameron
Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald-Stadler,
Wei Yongjun, linux-iio@vger.kernel.org
On Thu, Jul 14, 2016 at 1:06 PM, <weiyj_lk@163.com> wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> PTR_ERR should access the value just tested by IS_ERR, otherwise
> the wrong error code will be returned.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
My wrong! Thanks for fixing this.
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linuys Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] iio: pressure: bmp280: fix wrong pointer passed to PTR_ERR()
2016-07-22 13:10 ` Linus Walleij
@ 2016-07-23 6:45 ` Jonathan Cameron
0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Cameron @ 2016-07-23 6:45 UTC (permalink / raw)
To: Linus Walleij, weiyj_lk
Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald-Stadler,
Wei Yongjun, linux-iio@vger.kernel.org
On 22/07/16 15:10, Linus Walleij wrote:
> On Thu, Jul 14, 2016 at 1:06 PM, <weiyj_lk@163.com> wrote:
>
>> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>>
>> PTR_ERR should access the value just tested by IS_ERR, otherwise
>> the wrong error code will be returned.
>>
>> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> My wrong! Thanks for fixing this.
>
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
I've created a temporary branch fixes-togreg-post-rc1 and
will as the name suggests send this upstream once the merge
window closes.
Thanks,
Jonathan
>
> Yours,
> Linuys Walleij
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-07-23 10:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1468487141-20016-1-git-send-email-weiyj_lk@163.com>
2016-07-14 11:06 ` [PATCH -next] iio: pressure: bmp280: fix wrong pointer passed to PTR_ERR() weiyj_lk
2016-07-22 13:10 ` Linus Walleij
2016-07-23 6:45 ` 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).