Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit d7aa701a authored by Adrian Hunter's avatar Adrian Hunter Committed by Connor O'Brien
Browse files

UPSTREAM: 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: default avatarAdrian Hunter <adrian.hunter@intel.com>
Cc: stable@vger.kernel.org # 5.9+
Reviewed-by: default avatarRafael J. Wysocki <rafael@kernel.org>
Link: https://lore.kernel.org/r/20210716114408.17320-2-adrian.hunter@intel.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit e64daad660a0c9ace3acdc57099fffe5ed83f977)
Bug: 187129171
Signed-off-by: default avatarConnor O'Brien <connoro@google.com>
Change-Id: Idfa829a1a16960fd4ffd1c2733ae9f11f9123d09
parent 2e30052a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment