Re: [PATCH 2/2] cxl/region: Fix missing put_device(region_dev)

From: Dan Carpenter
Date: Mon Apr 29 2024 - 06:33:10 EST


Btw, I assume you're doing some kind of static analysis? Looking for
missing NULL checks is very tricky and I haven't found a way to do it
well except for looking at failed allocations. Allocations have to be
checked.

There are so many other functions where we leave off the NULL check
because the caller knows it can't fail.

regards,
dan carpenter