Re: [PATCH 2/2] ASoC: spacemit: init *dp to NULL before error paths
From: Bui Duc Phuc
Date: Mon Aug 03 2026 - 00:08:02 EST
Hi Troy,
By the way, I noticed that spacemit_i2s_init_dai() is quite similar to
rockchip_i2s_init_dai().
However, unlike the Rockchip driver, spacemit_i2s_dai already has most
of the playback
and capture capabilities initialized statically. As a result,
spacemit_i2s_init_dai() ends up
assigning the same values again, for example channels_min, channels_max, rates,
and formats, which seems redundant.
If you think that makes sense, I can either remove those redundant assignments,
or make it follow the Rockchip approach by keeping the static spacemit_i2s_dai
minimal and initializing those fields only in spacemit_i2s_init_dai().
Best regards,
Phuc