diff options
authorLinus Torvalds <>2020-07-26 19:29:22 +0300
committerLinus Torvalds <>2020-07-26 19:29:22 +0300
commit7f2e231c316591246284b10b008cadfc953f16d3 (patch)
parentf208a76fcb5700a0c5104e5888679acc31d1ce41 (diff)
parent29c4a54bc645c8b6745eeb58519e9ad794ceb419 (diff)
Merge tag 'driver-core-5.8-rc7' of git:// 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:// device property: Avoid NULL pointer dereference in device_get_next_child_node()
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;