https://github.com/torvalds/linux
Revision 61d791365b72a89062fbbea69aa61479476da946 authored by Linus Torvalds on 25 December 2020, 23:41:13 UTC, committed by Linus Torvalds on 25 December 2020, 23:41:13 UTC
clang (quite rightly) complains fairly loudly about the newly added
mpc1_get_mpc_out_mux() function returning an uninitialized value if the
'opp_id' checks don't pass.

This may not happen in practice, but the code really shouldn't return
garbage if the sanity checks don't pass.

So just initialize 'val' to zero to avoid the issue.

Fixes: 110b055b2827 ("drm/amd/display: add getter routine to retrieve mpcc mux")
Cc: Josip Pavic <Josip.Pavic@amd.com>
Cc: Bindu Ramamurthy <bindu.r@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 5814bc2
History
Tip revision: 61d791365b72a89062fbbea69aa61479476da946 authored by Linus Torvalds on 25 December 2020, 23:41:13 UTC
drm/amd/display: avoid uninitialized variable warning
Tip revision: 61d7913
File Mode Size
Documentation
LICENSES
arch
block
certs
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.clang-format -rw-r--r-- 16.3 KB
.cocciconfig -rw-r--r-- 59 bytes
.get_maintainer.ignore -rw-r--r-- 71 bytes
.gitattributes -rw-r--r-- 62 bytes
.gitignore -rw-r--r-- 1.8 KB
.mailmap -rw-r--r-- 17.9 KB
COPYING -rw-r--r-- 496 bytes
CREDITS -rw-r--r-- 97.9 KB
Kbuild -rw-r--r-- 1.3 KB
Kconfig -rw-r--r-- 555 bytes
MAINTAINERS -rw-r--r-- 571.6 KB
Makefile -rw-r--r-- 62.9 KB
README -rw-r--r-- 727 bytes

README

back to top