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

Krzysztof Kozlowski <[email protected]> Wed, 15 Jul 2026 06:47:02 +0200
Newsgroups org.infradead.lists.ath10k,org.kernel.vger.linux-kernel,org.kernel.vger.linux-wireless
Message-ID <[email protected]>
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