power: supply: rt9467: Fix rt9467_run_aicl()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Wed, 15 Feb 2023 12:43:04 +0000 (13:43 +0100)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Thu, 14 Sep 2023 16:09:14 +0000 (18:09 +0200)
commitcba320408d631422fef0ad8407954fb9d6f8f650
treec0cf17ba12dfb20d0d05a5e7889ea395fdc38671
parentcbcdfbf5a6cd66e47e5ee5d49c4c5a27a07ba082
power: supply: rt9467: Fix rt9467_run_aicl()

It is spurious to bail-out on a wait_for_completion_timeout() call that
does NOT timeout.

Reverse the logic to return -ETIMEDOUT instead, in case of tiemout.

Fixes: 6f7f70e3a8dd ("power: supply: rt9467: Add Richtek RT9467 charger driver")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: ChiYuan Huang <cy_huang@richtek.com>
Link: https://lore.kernel.org/r/2ed01020fa8a135c36dbaa871095ded47d926507.1676464968.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/rt9467-charger.c