]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: SOF: Propagate sof_get_ctrl_copy_params() error properly
authorTakashi Iwai <tiwai@suse.de>
Tue, 7 May 2019 19:39:10 +0000 (21:39 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 8 May 2019 06:20:25 +0000 (15:20 +0900)
commit49c951d30aca788e6a8c4dcc42535993c400e950
tree8169236a4c79ef2c7b65690be79bbcdf34d34ca0
parent51a03fc9b541bdcd1c50aeb5d6b1a39b42658138
ASoC: SOF: Propagate sof_get_ctrl_copy_params() error properly

This fixes a compile warning below by properly handling the error code
from sof_get_ctrl_copy_params():
  include/linux/kernel.h:843:43: warning: 'sparams.pl_size' may be used uninitialized in this function [-Wmaybe-uninitialized]
  sound/soc/sof/ipc.c:639:34: note: 'sparams.pl_size' was declared here

The function returns an error before setting sparams.pl_size, so it'd
assign an uninitialized value at a later point.

Fixes: 8547fa6b66b0 ("ASoC: SOF: Add support for IPC IO between DSP and Host")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/ipc.c