[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <aOaWpVGZSCY6kN-6@homelab>
Date: Thu, 9 Oct 2025 00:51:49 +0800
From: Shuhao Fu <sfual@....ust.hk>
To: Jonathan Cameron <jic23@...nel.org>, Chen-Yu Tsai <wens@...e.org>,
Jernej Skrabec <jernej.skrabec@...il.com>,
Samuel Holland <samuel@...lland.org>
Cc: David Lechner <dlechner@...libre.com>,
Nuno Sá <nuno.sa@...log.com>,
Andy Shevchenko <andy@...nel.org>, linux-iio@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-sunxi@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: [PATCH] iio: adc: Fix pm runtime clean-up in sun4i_gpadc_probe
In `sun4i_gpadc_probe`, in case of thermal register failure, the runtime
PM usage counter would not be decreased, resulting in a possible
inconsistency of runtime PM state.
Fixes: b0a242894f11 ("iio: adc: sun4i-gpadc-iio: register in the thermal after registering in pm")
Signed-off-by: Shuhao Fu <sfual@....ust.hk>
---
drivers/iio/adc/sun4i-gpadc-iio.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/iio/adc/sun4i-gpadc-iio.c b/drivers/iio/adc/sun4i-gpadc-iio.c
index 6b8d6bee1873..ae4a59a965b9 100644
--- a/drivers/iio/adc/sun4i-gpadc-iio.c
+++ b/drivers/iio/adc/sun4i-gpadc-iio.c
@@ -644,7 +644,8 @@ static int sun4i_gpadc_probe(struct platform_device *pdev)
dev_err(&pdev->dev,
"could not register thermal sensor: %ld\n",
PTR_ERR(info->tzd));
- return PTR_ERR(info->tzd);
+ ret = PTR_ERR(info->tzd);
+ goto err_map;
}
}
--
2.39.5
Powered by blists - more mailing lists