diff options
Diffstat (limited to 'drivers/of/base.c')
-rw-r--r-- | drivers/of/base.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/of/base.c b/drivers/of/base.c index f72d19b7e5d2..6d4ee22708c9 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c | |||
@@ -1828,17 +1828,13 @@ int of_update_property(struct device_node *np, struct property *newprop) | |||
1828 | next = &(*next)->next; | 1828 | next = &(*next)->next; |
1829 | } | 1829 | } |
1830 | raw_spin_unlock_irqrestore(&devtree_lock, flags); | 1830 | raw_spin_unlock_irqrestore(&devtree_lock, flags); |
1831 | if (rc) | 1831 | if (!found) |
1832 | return rc; | 1832 | return -ENODEV; |
1833 | 1833 | ||
1834 | /* Update the sysfs attribute */ | 1834 | /* Update the sysfs attribute */ |
1835 | if (oldprop) | 1835 | sysfs_remove_bin_file(&np->kobj, &oldprop->attr); |
1836 | sysfs_remove_bin_file(&np->kobj, &oldprop->attr); | ||
1837 | __of_add_property_sysfs(np, newprop); | 1836 | __of_add_property_sysfs(np, newprop); |
1838 | 1837 | ||
1839 | if (!found) | ||
1840 | return -ENODEV; | ||
1841 | |||
1842 | return 0; | 1838 | return 0; |
1843 | } | 1839 | } |
1844 | 1840 | ||