summaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2021-10-22 12:41:16 +0200
committerDavid S. Miller <davem@davemloft.net>2021-10-22 12:41:16 +0200
commitbdfa75ad70e93633e18b1ed2b3866c01aa9bf9d2 (patch)
tree45115e9c988cbaa49f3766cbe6e6775757cb8c20 /drivers/base
parentMerge branch 'ax88796c-spi-ethernet-adapter' (diff)
parentMerge tag 'drm-fixes-2021-10-22' of git://anongit.freedesktop.org/drm/drm (diff)
downloadlinux-bdfa75ad70e93633e18b1ed2b3866c01aa9bf9d2.tar.xz
linux-bdfa75ad70e93633e18b1ed2b3866c01aa9bf9d2.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Lots of simnple overlapping additions. With a build fix from Stephen Rothwell. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/base')
-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 15986cc2fe5e..249da496581a 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) ||