Re: [PATCH 2/2] ASoC: spacemit: init *dp to NULL before error paths
Bui Duc Phuc <[email protected]> Mon, 3 Aug 2026 11:07:42 +0700
| Newsgroups | dev.linux.lists.spacemit,org.infradead.lists.linux-riscv,org.kernel.vger.linux-kernel,org.kernel.vger.linux-sound |
|---|---|
| Message-ID | <CAABR9nG=s78=5_tGSieN7hdCQOMNzJKdzJo5cx2bMfgAvJM+aw@mail.gmail.com> |
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