]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
ASoC: adau1372: Fix unchecked clk_prepare_enable() return value
authorJihed Chaibi <jihed.chaibi.dev@gmail.com>
Wed, 25 Mar 2026 21:07:03 +0000 (22:07 +0100)
committerMark Brown <broonie@kernel.org>
Thu, 26 Mar 2026 10:33:35 +0000 (10:33 +0000)
commit326fe8104a4020d30080d37ac8b6b43893cdebca
treeea2fcdfbade7500bfd7aa7d380a5256f7a7b0679
parentc369299895a591d96745d6492d4888259b004a9e
ASoC: adau1372: Fix unchecked clk_prepare_enable() return value

adau1372_set_power() calls clk_prepare_enable() but discards the return
value. If the clock enable fails, the driver proceeds to access registers
on unpowered hardware, potentially causing silent corruption.

Make adau1372_set_power() return int and propagate the error from
clk_prepare_enable(). Update adau1372_set_bias_level() to return the
error directly for the STANDBY and OFF cases.

Signed-off-by: Jihed Chaibi <jihed.chaibi.dev@gmail.com>
Fixes: 6cd4c6459e47 ("ASoC: Add ADAU1372 audio CODEC support")
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Link: https://patch.msgid.link/20260325210704.76847-2-jihed.chaibi.dev@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/adau1372.c