aboutsummaryrefslogtreecommitdiff
path: root/include/media/frame_vector.h
diff options
context:
space:
mode:
authorGravatar Nathan Chancellor <nathan@kernel.org> 2022-11-28 06:16:22 +0000
committerGravatar Mauro Carvalho Chehab <mchehab@kernel.org> 2022-12-06 07:13:51 +0000
commit1aba7930c63ea57b4918dc61dcc315f451cec21e (patch)
tree562c3effabaf102b0833bfa2513442e01d5a4a24 /include/media/frame_vector.h
parentmedia: dvb/frontend.h: fix kernel-doc warnings (diff)
downloadlinux-1aba7930c63ea57b4918dc61dcc315f451cec21e.tar.gz
linux-1aba7930c63ea57b4918dc61dcc315f451cec21e.tar.bz2
linux-1aba7930c63ea57b4918dc61dcc315f451cec21e.zip
media: rzg2l-cru: Remove unnecessary shadowing of ret in rzg2l_csi2_s_stream()
Clang warns: drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c:445:7: error: variable 'ret' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] if (ret) ^~~ drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c:475:9: note: uninitialized use occurs here return ret; ^~~ drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c:445:3: note: remove the 'if' if its condition is always false if (ret) ^~~~~~~~ drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c:441:7: error: variable 'ret' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] if (ret) ^~~ drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c:475:9: note: uninitialized use occurs here return ret; ^~~ drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c:441:3: note: remove the 'if' if its condition is always false if (ret) ^~~~~~~~ drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c:431:9: note: initialize the variable 'ret' to silence this warning int ret; ^ = 0 2 errors generated. ret is unnecessarily shadowed, meaning the assignments to ret within the first 'if (enable)' block are only applied to the inner scope, not the outer one as intended. Remove the shadowing to fix the warnings and make everything work correctly. Link: https://github.com/ClangBuiltLinux/linux/issues/1764 Fixes: 51e8415e39a9 ("media: platform: Add Renesas RZ/G2L MIPI CSI-2 receiver driver") Signed-off-by: Nathan Chancellor <nathan@kernel.org> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'include/media/frame_vector.h')
0 files changed, 0 insertions, 0 deletions