projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3297c8f
)
base: core: Remove WARN_ON from link dependencies check
author
Benjamin Gaignard
<benjamin.gaignard@linaro.org>
Mon, 16 Jul 2018 11:37:44 +0000
(13:37 +0200)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Sat, 21 Jul 2018 07:51:44 +0000
(09:51 +0200)
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>
drivers/base/core.c
patch
|
blob
|
history
diff --git
a/drivers/base/core.c
b/drivers/base/core.c
index 5411af44741809b4d02b5865c4c6aed415ce4534..2300d834d11ff841e4eecd11c795bdb0196eec1c 100644
(file)
--- 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);