summaryrefslogtreecommitdiff
path: root/drivers/base/core.c
diff options
context:
space:
mode:
authorBenjamin Gaignard <benjamin.gaignard@linaro.org>2018-07-16 14:37:44 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-07-21 10:51:44 +0300
commite16f4f3e0b7daecd48d4f944ab4147c1a6cb16a8 (patch)
tree02c94be8042debb20bc40926891c893dcf018978 /drivers/base/core.c
parent3297c8fc65af5d40501ea7cddff1b195cae57e4e (diff)
downloadlinux-e16f4f3e0b7daecd48d4f944ab4147c1a6cb16a8.tar.xz
base: core: Remove WARN_ON from link dependencies check
In some cases the link between between customer and supplier already exist, for example when a device use its parent as a supplier. Do not warn about already existing dependencies because device_link_add() takes care of this case. Link: http://lkml.kernel.org/r/20180709111753eucas1p1f32e66fb2f7ea3216097cd72a132355d~-rzycA5Rg0378203782eucas1p1C@eucas1p1.samsung.com Reported-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: Mark Brown <broonie@kernel.org> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com> Reviewed-by: Rafael J. Wysocki <rafael@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/core.c')
-rw-r--r--drivers/base/core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 5411af447418..2300d834d11f 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -105,7 +105,7 @@ static int device_is_dependent(struct device *dev, void *target)
struct device_link *link;
int ret;
- if (WARN_ON(dev == target))
+ if (dev == target)
return 1;
ret = device_for_each_child(dev, target, device_is_dependent);
@@ -113,7 +113,7 @@ static int device_is_dependent(struct device *dev, void *target)
return ret;
list_for_each_entry(link, &dev->links.consumers, s_node) {
- if (WARN_ON(link->consumer == target))
+ if (link->consumer == target)
return 1;
ret = device_is_dependent(link->consumer, target);