diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-09-01 03:45:05 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-09-01 03:45:05 +0200 |
commit | 498012511a060575a56551d28a10bb392aa361b5 (patch) | |
tree | d9dd9060eb6b3037804eca8e22056e7cdb1a26dd /include/linux | |
parent | 5d2a1a927d487d6bb60c87b837d82702d8ebcaad (diff) | |
parent | 4bf011815f2e093c7f60004f4f5683cf40b905b9 (diff) |
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 'include/linux')
-rw-r--r-- | include/linux/of.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/of.h b/include/linux/of.h index edc068d19c79..2194b8ca41f9 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -136,7 +136,8 @@ static inline bool is_of_node(struct fwnode_handle *fwnode) static inline struct device_node *to_of_node(struct fwnode_handle *fwnode) { - return fwnode ? container_of(fwnode, struct device_node, fwnode) : NULL; + return is_of_node(fwnode) ? + container_of(fwnode, struct device_node, fwnode) : NULL; } static inline bool of_have_populated_dt(void) |