From 5cdade2d77dd41a2ed98967c3887f5d66a4d23c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Sun, 19 Mar 2023 11:06:18 +0100 Subject: of: unittest: Drop call to platform_set_drvdata(..., NULL) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Link: https://lore.kernel.org/r/20230319100620.295849-2-u.kleine-koenig@pengutronix.de Signed-off-by: Rob Herring --- drivers/of/unittest.c | 1 - 1 file changed, 1 deletion(-) (limited to 'drivers/of') 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; -- cgit v1.2.3