提交 e16f4f3e 编写于 作者: B Benjamin Gaignard 提交者: Greg Kroah-Hartman

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.comReported-by: NMarek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: NMark Brown <broonie@kernel.org>
Signed-off-by: NBenjamin Gaignard <benjamin.gaignard@st.com>
Reviewed-by: NRafael J. Wysocki <rafael@kernel.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 3297c8fc
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册