linux_dsm_epyc7002/drivers/soc/mediatek
Nathan Chancellor 89e28da828 soc: mediatek: pwrap: Zero initialize rdata in pwrap_init_cipher
When building with -Wsometimes-uninitialized, Clang warns:

drivers/soc/mediatek/mtk-pmic-wrap.c:1358:6: error: variable 'rdata' is
used uninitialized whenever '||' condition is true
[-Werror,-Wsometimes-uninitialized]

If pwrap_write returns non-zero, pwrap_read will not be called to
initialize rdata, meaning that we will use some random uninitialized
stack value in our print statement. Zero initialize rdata in case this
happens.

Link: https://github.com/ClangBuiltLinux/linux/issues/401
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2019-04-12 21:57:49 +02:00
..
Kconfig soc: mediatek: Add Mediatek CMDQ helper 2018-12-02 20:46:10 +01:00
Makefile soc: mediatek: Add Mediatek CMDQ helper 2018-12-02 20:46:10 +01:00
mtk-cmdq-helper.c soc: mediatek: Add Mediatek CMDQ helper 2018-12-02 20:46:10 +01:00
mtk-infracfg.c soc: mediatek: reuse regmap_read_poll_timeout helpers 2018-05-14 12:19:25 +02:00
mtk-pmic-wrap.c soc: mediatek: pwrap: Zero initialize rdata in pwrap_init_cipher 2019-04-12 21:57:49 +02:00
mtk-scpsys.c - Error path bug fix for overflow tests (Dan) 2018-06-12 18:28:00 -07:00