Re: [PATCH v1 1/1] ASoC: Intel: cht_bsw_rt5672: Drop unneeded NULL checks

From: Andy Shevchenko

Date: Tue Apr 28 2026 - 04:19:07 EST


On Tue, Apr 28, 2026 at 05:07:39PM +0900, Mark Brown wrote:
> On Tue, Apr 28, 2026 at 09:47:58AM +0200, Andy Shevchenko wrote:
> > After the commit 7735bce05a9c ("ASoC: Intel: boards: use devm_clk_get()
> > unconditionally") the driver assumes that mclk is always provided, hence
> > no need to check for it being NULL anymore.
>
> There's also the fact that as part of support for optional clocks the
> clock API will quite happily consume NULL clocks.

This clock is not optional, it's always retrieved with devm_clk_get().
When the flow runs into these code pieces the mclk != NULL, and always
valid (excluding some unrelated to this driver strange data corruption cases,
of course).

But yes, the CCF APIs are NULL-aware for a long time.

--
With Best Regards,
Andy Shevchenko