summaryrefslogtreecommitdiff
path: root/drivers/base/core.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-10-18 09:43:37 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-10-18 09:43:37 +0200
commitb5bc8ac25aa1477fee3853718f2673a594efdc4b (patch)
treedcee1a7ae080d573c12a4a0411b9417746ffd343 /drivers/base/core.c
parent1f8818e352f721c49ebea39025f6c98f25756eff (diff)
parent519d81956ee277b4419c723adfb154603c2565ba (diff)
Merge 5.15-rc6 into driver-core-next
We need the driver-core fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/core.c')
-rw-r--r--drivers/base/core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c
index d78331b763c8..b67ebe6a323c 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -687,7 +687,8 @@ struct device_link *device_link_add(struct device *consumer,
{
struct device_link *link;
- if (!consumer || !supplier || flags & ~DL_ADD_VALID_FLAGS ||
+ if (!consumer || !supplier || consumer == supplier ||
+ flags & ~DL_ADD_VALID_FLAGS ||
(flags & DL_FLAG_STATELESS && flags & DL_MANAGED_LINK_FLAGS) ||
(flags & DL_FLAG_SYNC_STATE_ONLY &&
(flags & ~DL_FLAG_INFERRED) != DL_FLAG_SYNC_STATE_ONLY) ||