summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/aw88261.c
AgeCommit message (Collapse)AuthorFilesLines
2023-08-08ASoC: codecs: aw88261: avoid uninitialized variable warningArnd Bergmann1-0/+2
aw88261_reg_update() returns an unintialized error code in the success path: sound/soc/codecs/aw88261.c:651:7: error: variable 'ret' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] if (aw_dev->prof_cur != aw_dev->prof_index) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/codecs/aw88261.c:660:9: note: uninitialized use occurs here return ret; ^~~ sound/soc/codecs/aw88261.c:651:3: note: remove the 'if' if its condition is always true if (aw_dev->prof_cur != aw_dev->prof_index) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Return zero instead here. Fixes: 028a2ae256916 ("ASoC: codecs: Add aw88261 amplifier driver") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20230808125703.1611325-1-arnd@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-08-07ASoC: codecs: Add aw88261 amplifier driverWeidong Wang1-0/+1298
Add i2c and amplifier registration for aw88261 and their associated operation functions. Signed-off-by: Weidong Wang <wangweidong.a@awinic.com> Link: https://lore.kernel.org/r/20230804114749.215460-4-wangweidong.a@awinic.com Signed-off-by: Mark Brown <broonie@kernel.org>