Skip to content

Commit 29c8ab7

Browse files
andy-shevgregkh
authored andcommitted
driver core: Call in reversed order in device_platform_notify_remove()
It's logically correct to call the removal notifiers in the reversed order as it might be dependent to each other. Luckily, platform_notify_remove() currently is not used and the others have no dependency use, but theoretically it's still possible. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20230818133654.767986-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent d21fdd0 commit 29c8ab7

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/base/core.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2306,12 +2306,12 @@ static void device_platform_notify(struct device *dev)
23062306

23072307
static void device_platform_notify_remove(struct device *dev)
23082308
{
2309-
acpi_device_notify_remove(dev);
2309+
if (platform_notify_remove)
2310+
platform_notify_remove(dev);
23102311

23112312
software_node_notify_remove(dev);
23122313

2313-
if (platform_notify_remove)
2314-
platform_notify_remove(dev);
2314+
acpi_device_notify_remove(dev);
23152315
}
23162316

23172317
/**

0 commit comments

Comments
 (0)