summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNathan Chancellor <nathan@kernel.org>2025-12-19 16:08:08 -0700
committerMark Brown <broonie@kernel.org>2025-12-22 09:02:03 +0000
commit9e692bb5412a7b0e6534ba2d7158a57ed4b00658 (patch)
tree90b7290b58cc9e3c014a6364a18d48ad3aac0ec8 /include
parentdc8d1ba537c0bb4da91695b473dbe9a404f7ed7e (diff)
ASoC: rt1320: Change return type of rt1320_t0_load() to void
Clang warns (or errors with CONFIG_WERROR=y / W=e): sound/soc/codecs/rt1320-sdw.c:1387:6: error: variable 'ret' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] 1387 | if (!fw_ready) { | ^~~~~~~~~ sound/soc/codecs/rt1320-sdw.c:1421:9: note: uninitialized use occurs here 1421 | return ret; | ^~~ sound/soc/codecs/rt1320-sdw.c:1387:2: note: remove the 'if' if its condition is always false 1387 | if (!fw_ready) { | ^~~~~~~~~~~~~~~~ 1388 | dev_warn(dev, "%s, DSP FW is NOT ready\n", __func__); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1389 | goto _exit_; | ~~~~~~~~~~~~ 1390 | } | ~ sound/soc/codecs/rt1320-sdw.c:1366:9: note: initialize the variable 'ret' to silence this warning 1366 | int ret; | ^ | = 0 The return value of rt1320_t0_load() is never actually used, so it can just be eliminated altogether by returning void, clearing up the warning. Fixes: da1682d5e8b5 ("ASoC: rt1320: support calibration and temperature/r0 loading") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202512191711.wY6XU796-lkp@intel.com/ Signed-off-by: Nathan Chancellor <nathan@kernel.org> Acked-by: Shuming Fan <shumingf@realtek.com> Link: https://patch.msgid.link/20251219-rt1320-sdw-avoid-uninit-ret-v1-1-faa3e250ebc4@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions