lkml.org 
[lkml]   [2023]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/2] drm/nouveau/clk: avoid usage of list iterator after loop
From
Date
On Wed, 2023-03-01 at 18:25 +0100, Jakob Koschel wrote:
> + }
>   }
>  
> + BUG_ON(!pstate);
>   nvkm_debug(subdev, "setting performance state %d\n", pstatei);
>   clk->pstate = pstatei;

We should probably also replace this with

if (WARN_ON(!pstate)
return -EINVAL;

--
Cheers,
Lyude Paul (she/her)
Software Engineer at Red Hat

\
 
 \ /
  Last update: 2023-03-27 00:48    [W:0.595 / U:0.672 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site