linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] of: __of_update_property_sysfs only call __of_sysfs_remove_bin_file if of_node_is_attached
@ 2018-09-04 15:51 Andre Kalb
  2018-09-07 20:00 ` Frank Rowand
  0 siblings, 1 reply; 8+ messages in thread
From: Andre Kalb @ 2018-09-04 15:51 UTC (permalink / raw)
  To: robh+dt, frowand.list, devicetree, linux-kernel

To prevent warning "kernfs: can not remove '(null)', no directory" if an overlay isn't applied to the active devicetree.

Using of_remove_property and then of_add_property doesn't show the warning.

Signed-off-by: Andre Kalb <Andre.Kalb@sma.de>
---
Changes in v2:
  - Fix typo

 drivers/of/kobj.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/of/kobj.c b/drivers/of/kobj.c index 7a0a18980b98..962b660e8ad1 100644
--- a/drivers/of/kobj.c
+++ b/drivers/of/kobj.c
@@ -104,7 +104,7 @@ void __of_update_property_sysfs(struct device_node *np, struct property *newprop
                struct property *oldprop)
 {
        /* At early boot, bail out and defer setup to of_init() */
-       if (!of_kset)
+       if (!of_kset || !of_node_is_attached(np))
                return;

        if (oldprop)
--
2.17.1


___________________________________________________

SMA Solar Technology AG
Aufsichtsrat: Dr. Erik Ehrentraut (Vorsitzender)
Vorstand: Ulrich Hadding, Dr.-Ing. Juergen Reinert, Pierre-Pascal Urbon
Handelsregister: Amtsgericht Kassel HRB 3972
Sitz der Gesellschaft: 34266 Niestetal
USt-ID-Nr. DE 113 08 59 54
WEEE-Reg.-Nr. DE 95881150
___________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-09-27  1:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-04 15:51 [PATCH v2] of: __of_update_property_sysfs only call __of_sysfs_remove_bin_file if of_node_is_attached Andre Kalb
2018-09-07 20:00 ` Frank Rowand
2018-09-10  9:47   ` AW: " Andre Kalb
2018-09-10 13:46     ` Rob Herring
2018-09-13 15:21       ` AW: " Andre Kalb
2018-09-26 21:05         ` Rob Herring
2018-09-27  1:35           ` Frank Rowand
2018-09-19  9:25       ` Andre Kalb

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).