lkml.org 
[lkml]   [2018]   [Sep]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] of: __of_update_property_sysfs only call __of_sysfs_remove_bin_file if of_node_is_attached.
Date
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 than of_add_property don't show the warning.
---
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..2b71e5979580 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
___________________________________________________
\
 
 \ /
  Last update: 2018-09-04 13:30    [W:0.049 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site