Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48627 )
Change subject: commonlib/region: Add null parameters handling ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/48627/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/48627/1//COMMIT_MSG@9 PS1, Line 9: Prevent NULL-pointer dereference of child or parent root_device parameter.
After reviewing this patch I see your point. There is no need to add this check. […]
Yes, if you want a check an assert() would probably be more appropriate. But I also don't think this behavior is super important to test for, a null pointer access is usually pretty easy to notice. I would rather have the tests focus more thoroughly on the normal behavior of these functions.