[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230802133509.29381-1-aboutphysycs@gmail.com>
Date: Wed, 2 Aug 2023 16:35:09 +0300
From: Andrei Coardos <aboutphysycs@...il.com>
To: linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-stm32@...md-mailman.stormreply.com, linux-iio@...r.kernel.org
Cc: alexandre.torgue@...s.st.com, mcoquelin.stm32@...il.com,
lars@...afoo.de, jic23@...nel.org,
Andrei Coardos <aboutphysycs@...il.com>,
Alexandru Ardelean <alex@...uggie.ro>
Subject: [PATCH v2] iio: trigger: stm32-lptimer-trigger: remove unneeded platform_set_drvdata()
This function call was found to be unnecessary as there is no equivalent
platform_get_drvdata() call to access the private data of the driver. Also,
the private data is defined in this driver, so there is no risk of it being
accessed outside of this driver file.
Reviewed-by: Alexandru Ardelean <alex@...uggie.ro>
Signed-off-by: Andrei Coardos <aboutphysycs@...il.com>
---
Changelog V1->V2:
* https://lore.kernel.org/linux-iio/CAH3L5QpuoDYU6qvWH7_z5Yx0cW2qPMbCA8AFEYAPsiEkSzCiwQ@mail.gmail.com/T/#t
* Adjusted the returning values of the function
drivers/iio/trigger/stm32-lptimer-trigger.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/iio/trigger/stm32-lptimer-trigger.c b/drivers/iio/trigger/stm32-lptimer-trigger.c
index df2416e33375..ab1cc6a05f26 100644
--- a/drivers/iio/trigger/stm32-lptimer-trigger.c
+++ b/drivers/iio/trigger/stm32-lptimer-trigger.c
@@ -88,11 +88,7 @@ static int stm32_lptim_trigger_probe(struct platform_device *pdev)
priv->dev = &pdev->dev;
priv->trg = stm32_lptim_triggers[index];
- ret = stm32_lptim_setup_trig(priv);
- if (ret)
- return ret;
-
- return 0;
+ return stm32_lptim_setup_trig(priv);
}
static const struct of_device_id stm32_lptim_trig_of_match[] = {
--
2.34.1
Powered by blists - more mailing lists