diff options
| author | Sander Vanheule <sander@svanheule.net> | 2026-02-20 16:26:33 +0100 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-03-01 23:48:22 +0000 |
| commit | 272aabef50bc3fe58edd26de000f4cdd41bdbe60 (patch) | |
| tree | 88f8b952f82ec0047c988a4fdf311f537c3345fa /tools/perf/scripts/python | |
| parent | 11439c4635edd669ae435eec308f4ab8a0804808 (diff) | |
ASoC: sti: Return errors from regmap_field_alloc()
When regmap_field_alloc() fails, it can return an error. Specifically,
it will return PTR_ERR(-ENOMEM) when the allocation returns a NULL
pointer. The code then uses these allocations with a simple NULL check:
if (player->clk_sel) {
// May dereference invalid pointer (-ENOMEM)
err = regmap_field_write(player->clk_sel, ...);
}
Ensure initialization fails by forwarding the errors from
regmap_field_alloc(), thus avoiding the use of the invalid pointers.
Fixes: 76c2145ded6b ("ASoC: sti: Add CPU DAI driver for playback")
Signed-off-by: Sander Vanheule <sander@svanheule.net>
Link: https://patch.msgid.link/20260220152634.480766-2-sander@svanheule.net
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
