aboutsummaryrefslogtreecommitdiff
path: root/drivers/of
diff options
context:
space:
mode:
authorUwe Kleine-König2023-03-19 11:06:18 +0100
committerRob Herring2023-03-20 14:59:08 -0500
commit5cdade2d77dd41a2ed98967c3887f5d66a4d23c4 (patch)
treea423f0a6dbea3ea26cb3f28d366030ca4a3b44e2 /drivers/of
parent0415d5a010d5273afc8b069eedb68cb1250e1b4b (diff)
of: unittest: Drop call to platform_set_drvdata(..., NULL)
The driver core already unsets driver data after .remove() completes. So there is no reason to do this explicitly in the driver itself. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20230319100620.295849-2-u.kleine-koenig@pengutronix.de Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/of')
-rw-r--r--drivers/of/unittest.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
index b5a7a31d8bd2..2504092e8302 100644
--- a/drivers/of/unittest.c
+++ b/drivers/of/unittest.c
@@ -1639,7 +1639,6 @@ static int unittest_gpio_remove(struct platform_device *pdev)
if (devptr->chip.base != -1)
gpiochip_remove(&devptr->chip);
- platform_set_drvdata(pdev, NULL);
kfree(devptr);
return 0;