diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2023-08-18 15:36:54 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-08-22 16:57:39 +0200 |
commit | 29c8ab79e91d35b93cfab87bf67a11516f7b2051 (patch) | |
tree | a55d75542fb0829ac8fd1cbecfc65dcd832b524c /drivers/base | |
parent | driver core: Return proper error code when dev_set_name() fails (diff) | |
download | linux-29c8ab79e91d35b93cfab87bf67a11516f7b2051.tar.xz linux-29c8ab79e91d35b93cfab87bf67a11516f7b2051.zip |
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>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/core.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c index eb3a93dd7046..39f7a94aea73 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -2306,12 +2306,12 @@ static void device_platform_notify(struct device *dev) static void device_platform_notify_remove(struct device *dev) { - acpi_device_notify_remove(dev); + if (platform_notify_remove) + platform_notify_remove(dev); software_node_notify_remove(dev); - if (platform_notify_remove) - platform_notify_remove(dev); + acpi_device_notify_remove(dev); } /** |