[PATCH v1] ACPI: video: Clear driver_data pointer on remove

Rafael J. Wysocki posted 1 patch 1 month, 2 weeks ago
drivers/acpi/acpi_video.c |    1 +
1 file changed, 1 insertion(+)
[PATCH v1] ACPI: video: Clear driver_data pointer on remove
Posted by Rafael J. Wysocki 1 month, 2 weeks ago
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

After commit 02c057ddefef ("ACPI: video: Convert the driver to a
platform one") the driver_data pointer in the ACPI companion device
object is not cleared automatically on driver remove any more, so
clear it directly in acpi_video_bus_remove().

Fixes: 02c057ddefef ("ACPI: video: Convert the driver to a platform one")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---

Applies on top of the current mainline.

---
 drivers/acpi/acpi_video.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/acpi/acpi_video.c
+++ b/drivers/acpi/acpi_video.c
@@ -2116,6 +2116,7 @@ static void acpi_video_bus_remove(struct
 
 	kfree(video->attached_array);
 	kfree(video);
+	device->driver_data = NULL;
 }
 
 static int __init is_i740(struct pci_dev *dev)