-
Dan Carpenter authored
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: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/b32e80cf-b385-40cd-b8ec-77ec73e07530@moroto.mountainSigned-off-by: Mark Brown <broonie@kernel.org>
991b5e2a