diff mbox series

[v1,3/6] ACPI: acpi_video: Remove unnecessary driver_data clear

Message ID 20231025111806.2416524-4-michal.wilczynski@intel.com
State New
Headers show
Series Replace acpi_driver with platform_driver | expand

Commit Message

Michal Wilczynski Oct. 25, 2023, 11:18 a.m. UTC
Commit
0d16710146a1 ("ACPI: bus: Set driver_data to NULL every time .add() fails")
introduced clearing driver_data every time probe fails, so it's not
necessary to clear it in the probe() callback.

Remove NULL assignment to driver_data in error path in
acpi_video_bus_add().

Signed-off-by: Michal Wilczynski <michal.wilczynski@intel.com>
---
 drivers/acpi/acpi_video.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Andy Shevchenko Oct. 26, 2023, 12:22 p.m. UTC | #1
On Wed, Oct 25, 2023 at 02:18:03PM +0300, Michal Wilczynski wrote:
> Commit
> 0d16710146a1 ("ACPI: bus: Set driver_data to NULL every time .add() fails")

It's fine to wrap it here, it's just a restriction in the tag block that one
tag == one line. Also I believe the form "The commit" sounds more English :-)
as reader knows exact commit we are talking about.

> introduced clearing driver_data every time probe fails, so it's not
> necessary to clear it in the probe() callback.

> Remove NULL assignment to driver_data in error path in
> acpi_video_bus_add().

This can be one line.
diff mbox series

Patch

diff --git a/drivers/acpi/acpi_video.c b/drivers/acpi/acpi_video.c
index e17474949bbb..0c93b0ef0feb 100644
--- a/drivers/acpi/acpi_video.c
+++ b/drivers/acpi/acpi_video.c
@@ -2077,7 +2077,6 @@  static int acpi_video_bus_add(struct acpi_device *device)
 	kfree(video->attached_array);
 err_free_video:
 	kfree(video);
-	device->driver_data = NULL;
 
 	return error;
 }