From: Mark Brown Date: Thu, 26 Mar 2026 10:33:38 +0000 (+0000) Subject: ASoC: adau1372: Fix error handling in adau1372_set_power() X-Git-Tag: v7.0-rc6~30^2~6^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6eea4ff846ed342a12cedf3af730a6204a8d97e;p=thirdparty%2Flinux.git ASoC: adau1372: Fix error handling in adau1372_set_power() Jihed Chaibi says: adau1372_set_power() had two related error handling issues in its enable path: clk_prepare_enable() was called but its return value discarded, and adau1372_enable_pll() was a void function that silently swallowed lock failures, leaving mclk enabled and adau1372->enabled set to true despite the device being in a broken state. Patch 1 fixes the unchecked clk_prepare_enable() by making adau1372_set_power() return int and propagating the error. Patch 2 converts adau1372_enable_pll() to return int and adds a full unwind in adau1372_set_power() if PLL lock fails, reversing the regcache, GPIO power-down, and clock state. --- c6eea4ff846ed342a12cedf3af730a6204a8d97e