Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kunit: Fix potential null dereference in kunit_device_driver_test()
kunit_kzalloc() may return a NULL pointer, dereferencing it without NULL check may lead to NULL dereference. Add a NULL check for test_state. Link: https://lore.kernel.org/r/[email protected] Fixes: d03c720 ("kunit: Add APIs for managing devices") Signed-off-by: Zichen Xie <[email protected]> Cc: [email protected] Reviewed-by: David Gow <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
- Loading branch information