diff options
author | Nathan Chancellor <nathan@kernel.org> | 2021-06-21 21:56:45 +0300 |
---|---|---|
committer | Jassi Brar <jaswinder.singh@linaro.org> | 2021-06-26 20:06:18 +0300 |
commit | e80a7e7eafcd5e75bf8c73164cae954b3f0addbc (patch) | |
tree | 7d230f6ec62b6f0d0c7cb6f183fcc918f800e5f4 /virt | |
parent | 8a7cdb108d3020e221944fbd52b9e047f3f51594 (diff) | |
download | linux-e80a7e7eafcd5e75bf8c73164cae954b3f0addbc.tar.xz |
mailbox: imx: Avoid using val uninitialized in imx_mu_isr()
Clang warns:
drivers/mailbox/imx-mailbox.c:284:2: warning: variable 'val' is used
uninitialized whenever switch default is taken
[-Wsometimes-uninitialized]
default:
^~~~~~~
drivers/mailbox/imx-mailbox.c:288:7: note: uninitialized use occurs here
if (!val)
^~~
drivers/mailbox/imx-mailbox.c:263:9: note: initialize the variable 'val'
to silence this warning
u32 val, ctrl;
^
= 0
1 warning generated.
Prior to commit 91c8c1fbe498 ("mailbox: imx: add xSR/xCR register
array"), val was always initialized in imx_mu_isr() but now, it is not
initialized in the default case. Return IRQ_NONE like the statement
below does and add a message that there is an unhandled type for this
switch statement so that it can be updated.
Fixes: 91c8c1fbe498 ("mailbox: imx: add xSR/xCR register array")
Link: https://github.com/ClangBuiltLinux/linux/issues/1404
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Diffstat (limited to 'virt')
0 files changed, 0 insertions, 0 deletions