summaryrefslogtreecommitdiff
path: root/drivers/iio/trigger/stm32-lptimer-trigger.c
diff options
context:
space:
mode:
authorAndrei Coardos <aboutphysycs@gmail.com>2023-08-02 15:09:15 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2023-08-05 19:29:39 +0100
commitd866f14071b8b0d52ee459223d87e3f26f261ddf (patch)
treeab2c430ab2b159decf2426944b989c23a7e3730e /drivers/iio/trigger/stm32-lptimer-trigger.c
parente19480dded1b37234bc28c911a9ea0a3d2e855b2 (diff)
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@shruggie.ro> Signed-off-by: Andrei Coardos <aboutphysycs@gmail.com> Link: https://lore.kernel.org/r/20230802120915.25631-1-aboutphysycs@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/trigger/stm32-lptimer-trigger.c')
-rw-r--r--drivers/iio/trigger/stm32-lptimer-trigger.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/iio/trigger/stm32-lptimer-trigger.c b/drivers/iio/trigger/stm32-lptimer-trigger.c
index 2e447a3f047d..f1e18913236a 100644
--- a/drivers/iio/trigger/stm32-lptimer-trigger.c
+++ b/drivers/iio/trigger/stm32-lptimer-trigger.c
@@ -73,7 +73,6 @@ static int stm32_lptim_trigger_probe(struct platform_device *pdev)
{
struct stm32_lptim_trigger *priv;
u32 index;
- int ret;
priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
if (!priv)
@@ -88,13 +87,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;
-
- platform_set_drvdata(pdev, priv);
-
- return 0;
+ return stm32_lptim_setup_trig(priv);
}
static const struct of_device_id stm32_lptim_trig_of_match[] = {