Skip to content

Commit 7f2e231

Browse files
committed
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()
2 parents f208a76 + 29c4a54 commit 7f2e231

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/base/property.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,7 @@ struct fwnode_handle *device_get_next_child_node(struct device *dev,
721721
return next;
722722

723723
/* When no more children in primary, continue with secondary */
724-
if (!IS_ERR_OR_NULL(fwnode->secondary))
724+
if (fwnode && !IS_ERR_OR_NULL(fwnode->secondary))
725725
next = fwnode_get_next_child_node(fwnode->secondary, child);
726726

727727
return next;

0 commit comments

Comments
 (0)