Adrian Hunter e64daad660 driver core: Prevent warning when removing a device link from unregistered consumer
sysfs_remove_link() causes a warning if the parent directory does not
exist. That can happen if the device link consumer has not been registered.
So do not attempt sysfs_remove_link() in that case.

Fixes: 287905e68dd29 ("driver core: Expose device link details in sysfs")
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: stable@vger.kernel.org # 5.9+
Reviewed-by: Rafael J. Wysocki <rafael@kernel.org>
Link: https://lore.kernel.org/r/20210716114408.17320-2-adrian.hunter@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-21 17:28:42 +02:00
..
2021-06-15 17:14:36 +02:00
2021-06-15 17:14:36 +02:00
2021-06-14 09:07:45 +02:00
2021-07-05 13:51:41 -07:00
2021-07-05 13:51:41 -07:00
2021-06-15 17:14:36 +02:00
2021-06-15 17:14:36 +02:00