]> Git Repo - linux.git/commit
ACPI: bus: Set driver_data to NULL every time .add() fails
authorMichal Wilczynski <[email protected]>
Mon, 3 Jul 2023 08:02:45 +0000 (11:02 +0300)
committerRafael J. Wysocki <[email protected]>
Fri, 14 Jul 2023 16:58:34 +0000 (18:58 +0200)
commit0d16710146a10cf62b3efddee8ffd006432d5d7e
tree8e52a5609ffbe51629a31c7f2b7c450e14019054
parentc542ce36a9f0bbf7c3a607ee31f1c39fda280782
ACPI: bus: Set driver_data to NULL every time .add() fails

Most ACPI drivers set driver_data in their .add() callbacks, but usually
they don't clear it in the error code path.

Set driver_data to NULL in acpi_device_probe() to prevent stale pointers
from staying around.

Signed-off-by: Michal Wilczynski <[email protected]>
[ rjw: Subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki <[email protected]>
drivers/acpi/bus.c
This page took 0.054301 seconds and 4 git commands to generate.