forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
-Wsometimes-uninitialized in sound/soc/amd/ps/pci-ps.c #1779
Labels
-Wsometimes-uninitialized
[BUG] linux-next
This is an issue only seen in linux-next
[FIXED][LINUX] development cycle
This bug was only present and fixed in a -next or -rc cycle
Comments
intel-lab-lkp
pushed a commit
to intel-lab-lkp/linux
that referenced
this issue
Jan 5, 2023
Clang warns: sound/soc/amd/ps/pci-ps.c:218:2: error: variable 'ret' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized] default: ^~~~~~~ sound/soc/amd/ps/pci-ps.c:239:9: note: uninitialized use occurs here return ret; ^~~ sound/soc/amd/ps/pci-ps.c:190:9: note: initialize the variable 'ret' to silence this warning int ret; ^ = 0 1 error generated. Return -ENODEV, which matches the debug message's description of this block. Fixes: 1d325cd ("ASoC: amd: ps: refactor platform device creation logic") Link: ClangBuiltLinux#1779 Signed-off-by: Nathan Chancellor <nathan@kernel.org>
intel-lab-lkp
pushed a commit
to intel-lab-lkp/linux
that referenced
this issue
Jan 6, 2023
Clang warns: sound/soc/amd/ps/pci-ps.c:218:2: error: variable 'ret' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized] default: ^~~~~~~ sound/soc/amd/ps/pci-ps.c:239:9: note: uninitialized use occurs here return ret; ^~~ sound/soc/amd/ps/pci-ps.c:190:9: note: initialize the variable 'ret' to silence this warning int ret; ^ = 0 1 error generated. ret is used uninitialized if 'goto de_init' is taken. As this is not an error nor should the ACP be deinitialized, just directly return 0 in this case statement, which resolves the warning. Fixes: 1d325cd ("ASoC: amd: ps: refactor platform device creation logic") Link: ClangBuiltLinux#1779 Suggested-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
intel-lab-lkp
pushed a commit
to intel-lab-lkp/linux
that referenced
this issue
Jan 10, 2023
Clang warns: sound/soc/amd/ps/pci-ps.c:218:2: error: variable 'ret' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized] default: ^~~~~~~ sound/soc/amd/ps/pci-ps.c:239:9: note: uninitialized use occurs here return ret; ^~~ sound/soc/amd/ps/pci-ps.c:190:9: note: initialize the variable 'ret' to silence this warning int ret; ^ = 0 1 error generated. ret is used uninitialized if 'goto de_init' is taken. As this is not an error nor should the ACP be deinitialized, just directly return 0 in this case statement, which resolves the warning. Fixes: 1d325cd ("ASoC: amd: ps: refactor platform device creation logic") Link: ClangBuiltLinux#1779 Suggested-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Signed-off-by: Nathan Chancellor <nathan@kernel.org> Reviewed-by: Syed Saba Kareem <syed.sabakareem@amd.com> Link: https://lore.kernel.org/r/20230105-wsometimes-uninitialized-pci-ps-c-v2-1-c50321676325@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
Fixed in -next now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
-Wsometimes-uninitialized
[BUG] linux-next
This is an issue only seen in linux-next
[FIXED][LINUX] development cycle
This bug was only present and fixed in a -next or -rc cycle
Patch submitted: https://lore.kernel.org/20230105-wsometimes-uninitialized-pci-ps-c-v1-1-4022fd077959@kernel.org/
The text was updated successfully, but these errors were encountered: