[PATCH 2/2] ASoC: spacemit: init *dp to NULL before error paths

Bui Duc Phuc phucduc.bui at gmail.com
Sun Aug 2 21:07:42 PDT 2026


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



More information about the linux-riscv mailing list