Skip to content
Unverified Commit 991b5e2a authored by Dan Carpenter's avatar Dan Carpenter Committed by Mark Brown
Browse files

regmap: kunit: Fix an NULL vs IS_ERR() check



The kunit_device_register() function returns error pointers, not NULL.
Passing an error pointer to get_device() will lead to an Oops.  Also
get_device() returns the same device you passed to it.  Fix it!  ;)

Fixes: 7b7982f1 ("regmap: kunit: Create a struct device for the regmap")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/b32e80cf-b385-40cd-b8ec-77ec73e07530@moroto.mountain


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 135cec6b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment