[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <171941009467.143534.7882184622422258601.b4-ty@collabora.com>
Date: Wed, 26 Jun 2024 15:54:54 +0200
From: Sebastian Reichel <sebastian.reichel@...labora.com>
To: Paul Cercueil <paul@...pouillou.net>,
Sebastian Reichel <sre@...nel.org>, Artur Rojek <contact@...ur-rojek.eu>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc: linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
linux-mips@...r.kernel.org, linux-pm@...r.kernel.org
Subject: Re: [PATCH] power: supply: ingenic: Fix some error handling paths
in ingenic_battery_get_property()
On Sun, 23 Jun 2024 07:50:32 +0200, Christophe JAILLET wrote:
> If iio_read_channel_processed() fails, 'val->intval' is not updated, but it
> is still *1000 just after. So, in case of error, the *1000 accumulate and
> 'val->intval' becomes erroneous.
>
> So instead of rescaling the value after the fact, use the dedicated scaling
> API. This way the result is updated only when needed. In case of error, the
> previous value is kept, unmodified.
>
> [...]
Applied, thanks!
[1/1] power: supply: ingenic: Fix some error handling paths in ingenic_battery_get_property()
commit: f8b6c1eb76f73ed721facd58d0cfb08513aad34c
Best regards,
--
Sebastian Reichel <sebastian.reichel@...labora.com>
Powered by blists - more mailing lists