[PATCH v3] fbdev: fsl-diu-fb: add missing device_remove_file()

oushixiong1025 at 163.com oushixiong1025 at 163.com
Mon Mar 10 01:54:31 UTC 2025


From: Shixiong Ou <oushixiong at kylinos.cn>

Call device_remove_file() when driver remove.

Signed-off-by: Shixiong Ou <oushixiong at kylinos.cn>
---
v1->v2:
	add has_dev_attrs flag.
v2->v3:
	drop those extra checks.

 drivers/video/fbdev/fsl-diu-fb.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/video/fbdev/fsl-diu-fb.c b/drivers/video/fbdev/fsl-diu-fb.c
index 5ac8201c3533..b71d15794ce8 100644
--- a/drivers/video/fbdev/fsl-diu-fb.c
+++ b/drivers/video/fbdev/fsl-diu-fb.c
@@ -1827,6 +1827,7 @@ static void fsl_diu_remove(struct platform_device *pdev)
 	int i;
 
 	data = dev_get_drvdata(&pdev->dev);
+	device_remove_file(&pdev->dev, &data->dev_attr);
 	disable_lcdc(&data->fsl_diu_info[0]);
 
 	free_irq(data->irq, data->diu_reg);
-- 
2.25.1



More information about the dri-devel mailing list