On 31/10/2024 18.11, Timur Tabi wrote: > On Thu, 2024-10-31 at 15:49 +0000, Zhi Wang wrote: >> Nice catch! >> >> It should be fixed in the re-factor in PATCH 12, where >> r535_gsp_msgq_wait() always returns an int (error code). > > I suspect that there are a lot of other places in the kernel, and not just > Nouveau, where IS_ERR_OR_NULL() is used incorrectly. > > Just looking the kernel casually, it seems to me that many usages of > IS_ERR_OR_NULL() are sloppy and should be changed to avoid that function. > Returning NULL should mean something different from returning -ERROR. Correct. Might need a re-visit of usage of IS_ERR_OR_NULL() at least in nouveau.