Re: [PATCH] ASoC: codecs: aw88399: Fix -Wuninitialized in aw_dev_set_vcalb()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, Nathan

On Fri, 27 Oct 2023 09:54:25 -0700 nathan@xxxxxxxxxx wrote:

> Clang warns (or errors with CONFIG_WERROR=y):

>  sound/soc/codecs/aw88399.c:441:18: error: variable 'vsense_select' is uninitialized when used here [-Werror,-Wuninitialized]
>    441 |         vsense_select = vsense_select & (~AW88399_VDSEL_MASK);
>        |                         ^~~~~~~~~~~~~
>  sound/soc/codecs/aw88399.c:431:28: note: initialize the variable 'vsense_select' to silence this warning
>    431 |         unsigned int vsense_select, vsense_value;
>        |                                   ^
>        |                                    = 0
>  1 error generated.

> This clearly should have been using the value received from
> regmap_read(). Use the correct variable to resolve the warning.

> Closes: https://github.com/ClangBuiltLinux/linux/issues/1952
> Fixes: 8ade6cc7e261 ("ASoC: codecs: Add aw88399 amplifier driver")
> Signed-off-by: Nathan Chancellor <nathan@xxxxxxxxxx>
> ---
> sound/soc/codecs/aw88399.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

Thank you very much for your patch.

Reviewed-by: Weidong Wang <wangweidong.a@xxxxxxxxxx>

Best regards,
Weidong Wang



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux