bool ret;
ret = __fwnode_property_present(fwnode, propname);
- if (ret == false && fwnode->secondary)
+ if (ret == false && fwnode && fwnode->secondary)
ret = __fwnode_property_present(fwnode->secondary, propname);
return ret;
}
int _ret_; \
_ret_ = FWNODE_PROP_READ(_fwnode_, _propname_, _type_, _proptype_, \
_val_, _nval_); \
- if (_ret_ == -EINVAL && _fwnode_->secondary) \
+ if (_ret_ == -EINVAL && _fwnode_ && _fwnode_->secondary) \
_ret_ = FWNODE_PROP_READ(_fwnode_->secondary, _propname_, _type_, \
_proptype_, _val_, _nval_); \
_ret_; \
int ret;
ret = __fwnode_property_read_string_array(fwnode, propname, val, nval);
- if (ret == -EINVAL && fwnode->secondary)
+ if (ret == -EINVAL && fwnode && fwnode->secondary)
ret = __fwnode_property_read_string_array(fwnode->secondary,
propname, val, nval);
return ret;
int ret;
ret = __fwnode_property_read_string(fwnode, propname, val);
- if (ret == -EINVAL && fwnode->secondary)
+ if (ret == -EINVAL && fwnode && fwnode->secondary)
ret = __fwnode_property_read_string(fwnode->secondary,
propname, val);
return ret;