On Wed, Dec 11, 2024 at 08:54:15AM +0100, Boris Brezillon wrote: > WARN() will return true if the condition is true, false otherwise. > If we store the return of drm_WARN_ON() in ret, we lose the actual > error code. > > v3: > - Add R-b > v2: > - Add R-b > > Fixes: 5fe909cae118 ("drm/panthor: Add the device logical block") > Signed-off-by: Boris Brezillon <boris.brezillon@xxxxxxxxxxxxx> > Reviewed-by: Steven Price <steven.price@xxxxxxx> > Reviewed-by: Adrian Larumbe <adrian.larumbe@xxxxxxxxxxxxx> Reviewed-by: Liviu Dudau <liviu.dudau@xxxxxxx> Best regards, Liviu > --- > drivers/gpu/drm/panthor/panthor_device.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/panthor/panthor_device.c b/drivers/gpu/drm/panthor/panthor_device.c > index 984615f4ed27..e701e605d013 100644 > --- a/drivers/gpu/drm/panthor/panthor_device.c > +++ b/drivers/gpu/drm/panthor/panthor_device.c > @@ -461,8 +461,8 @@ int panthor_device_resume(struct device *dev) > drm_dev_enter(&ptdev->base, &cookie)) { > panthor_gpu_resume(ptdev); > panthor_mmu_resume(ptdev); > - ret = drm_WARN_ON(&ptdev->base, panthor_fw_resume(ptdev)); > - if (!ret) { > + ret = panthor_fw_resume(ptdev); > + if (!drm_WARN_ON(&ptdev->base, ret)) { > panthor_sched_resume(ptdev); > } else { > panthor_mmu_suspend(ptdev); > -- > 2.47.0 > -- ==================== | I would like to | | fix the world, | | but they're not | | giving me the | \ source code! / --------------- ¯\_(ツ)_/¯