summaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-09-01 03:45:05 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-09-01 03:45:05 +0200
commit498012511a060575a56551d28a10bb392aa361b5 (patch)
treed9dd9060eb6b3037804eca8e22056e7cdb1a26dd /drivers/base
parent5d2a1a927d487d6bb60c87b837d82702d8ebcaad (diff)
parent4bf011815f2e093c7f60004f4f5683cf40b905b9 (diff)
downloadop-kernel-dev-498012511a060575a56551d28a10bb392aa361b5.zip
op-kernel-dev-498012511a060575a56551d28a10bb392aa361b5.tar.gz
Merge branch 'device-properties'
* device-properties: device property: check fwnode type in to_of_node() device property: attach 'else if' to the proper 'if' device property: fallback to pset when gettng one string device property: fix potential NULL pointer dereference
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/property.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/base/property.c b/drivers/base/property.c
index f3f6d16..841b15c 100644
--- a/drivers/base/property.c
+++ b/drivers/base/property.c
@@ -27,9 +27,10 @@
*/
void device_add_property_set(struct device *dev, struct property_set *pset)
{
- if (pset)
- pset->fwnode.type = FWNODE_PDATA;
+ if (!pset)
+ return;
+ pset->fwnode.type = FWNODE_PDATA;
set_secondary_fwnode(dev, &pset->fwnode);
}
EXPORT_SYMBOL_GPL(device_add_property_set);
@@ -461,7 +462,8 @@ int fwnode_property_read_string(struct fwnode_handle *fwnode,
return acpi_dev_prop_read(to_acpi_node(fwnode), propname,
DEV_PROP_STRING, val, 1);
- return -ENXIO;
+ return pset_prop_read_array(to_pset(fwnode), propname,
+ DEV_PROP_STRING, val, 1);
}
EXPORT_SYMBOL_GPL(fwnode_property_read_string);
OpenPOWER on IntegriCloud