]> git.itanic.dy.fi Git - linux-stable/commit
kunit: device: Fix a NULL vs IS_ERR() check in init()
authorDan Carpenter <dan.carpenter@linaro.org>
Wed, 10 Jan 2024 18:55:14 +0000 (21:55 +0300)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 22 Jan 2024 14:58:22 +0000 (07:58 -0700)
commit083974ebb8fc65978d6cacd1bcfe9158d6234b98
tree1ca947823ddefd78d72cd5f28da1518cfdd8d02e
parented1a72fb0d646c983c85b62144fb1d134a8edb71
kunit: device: Fix a NULL vs IS_ERR() check in init()

The root_device_register() function does not return NULL, it returns
error pointers.  Fix the check to match.

Fixes: d03c720e03bd ("kunit: Add APIs for managing devices")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Rae Moar <rmoar@google.com>
Reviewed-by: David Gow <davidgow@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
lib/kunit/device.c