Re: [PATCH] wifi: ath10k: Drop redundant NULL check on devm_clk_get()

From: Krzysztof Kozlowski

Date: Wed Jul 15 2026 - 00:47:16 EST


On 14/07/2026 00:31, Jeff Johnson wrote:
> On 7/5/2026 10:24 AM, Krzysztof Kozlowski wrote:
>> devm_clk_get() does not return NULL (only valid clock or ERR pointer),
>> so simplify the code to drop redundant IS_ERR_OR_NULL().
>
> FWIW my AI review agent says:
> Under !CONFIG_HAVE_CLK (x86 COMPILE_TEST), devm_clk_get() returns NULL;
> IS_ERR(NULL) is false so clock_init() returns 0 with NULL clocks stored
>
> Perhaps the stub function in include/linux/clk.h should be updated to return
> an ERR_PTR() instead of NULL?
>


Yes, that's on my todo list.

Best regards,
Krzysztof