diff options
author | Linus Torvalds | 2020-07-26 09:29:22 -0700 |
---|---|---|
committer | Linus Torvalds | 2020-07-26 09:29:22 -0700 |
commit | 7f2e231c316591246284b10b008cadfc953f16d3 (patch) | |
tree | 9412714f90ec4584ea31e91f8c0778b0843269c7 | |
parent | f208a76fcb5700a0c5104e5888679acc31d1ce41 (diff) | |
parent | 29c4a54bc645c8b6745eeb58519e9ad794ceb419 (diff) |
Merge tag 'driver-core-5.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core into master
Pull driver core fix from Greg KH:
"A single driver core fix for 5.8-rc7. It resolves a problem found in
the previous fix for this code made in 5.8-rc6. Hopefully this is all
now cleared up, as this seems to be the last of the reported issues in
this area, and was tested on the problem hardware.
This patch has been in linux-next with no reported problems"
* tag 'driver-core-5.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
device property: Avoid NULL pointer dereference in device_get_next_child_node()
-rw-r--r-- | drivers/base/property.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/property.c b/drivers/base/property.c index 1e6d75e65938..d58aa98fe964 100644 --- a/drivers/base/property.c +++ b/drivers/base/property.c @@ -721,7 +721,7 @@ struct fwnode_handle *device_get_next_child_node(struct device *dev, return next; /* When no more children in primary, continue with secondary */ - if (!IS_ERR_OR_NULL(fwnode->secondary)) + if (fwnode && !IS_ERR_OR_NULL(fwnode->secondary)) next = fwnode_get_next_child_node(fwnode->secondary, child); return next; |