Re: [PATCH next] PM: runtime: Fix error checking for kunit_device_register()

From: Rafael J. Wysocki
Date: Fri Oct 03 2025 - 15:14:34 EST


On Fri, Oct 3, 2025 at 7:02 PM Brian Norris <briannorris@xxxxxxxxxxxx> wrote:
>
> On Fri, Oct 03, 2025 at 12:29:31PM +0300, Dan Carpenter wrote:
> > The kunit_device_register() function never returns NULL, it returns
> > error pointers. Update the assertions to use
> > KUNIT_ASSERT_NOT_ERR_OR_NULL() instead of checking for NULL.
> >
> > Fixes: 7f7acd193ba8 ("PM: runtime: Add basic kunit tests for API contracts")
> > Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
>
> Thanks for the catch:
>
> Reviewed-by: Brian Norris <briannorris@xxxxxxxxxxxx>

Applied, thanks!