MLK-18978: drm: imx: dcss: fix warning message
This patch fixes a warning message that's seen during 4.14 compilation.
CC drivers/gpu/drm/imx/dcss/dcss-plane.o
drivers/gpu/drm/imx/dcss/dcss-plane.c: In function ‘dcss_plane_atomic_set_base’:
drivers/gpu/drm/imx/dcss/dcss-plane.c:347:4: warning: ‘caddr’ may be used uninitialized in this function [-Wmaybe-uninitialized]
dcss_dec400d_addr_set(dcss_plane->dcss, p1_ba, caddr);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The warning appeared because of a logic error in code that was
introduced by the following commit:
commit
a46e1cd7df28 ("MGS-3560 [#imx-913] Enable DRM compression for
mscale board")
The above commit moved a piece of code, that was located under
switch-case branch, under a do-while() loop and converted all the
returns to breaks. However, a break makes the code exit the while loop
and will continue executing the code under the case branch. Hence, caddr
may be used whithout being initialized.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
CC: Yong Gan <yong.gan@nxp.com>