video: zynqmp: Prevent use of uninitialised variables
authorAndrew Goodbody <andrew.goodbody@linaro.org>
Wed, 1 Oct 2025 16:36:43 +0000 (17:36 +0100)
committerMichal Simek <michal.simek@amd.com>
Thu, 9 Oct 2025 10:31:09 +0000 (12:31 +0200)
commit4c606b165b51b5e0ac8a3ecc8edd232345340145
treef4490e146dd223634fd2ce08480021fabf48f295
parented5b149b81ad2679de40035e13b43d80262debc7
video: zynqmp: Prevent use of uninitialised variables

The variables 'offset_matrix' and 'csc_matrix' will be used
uninitialised if video->is_rgb is false. Correct the logic so the
attempt to use uninitialised variables is not made. Also remove the use
of these variables as they seem to serve no useful purpose just being
aliases for arrays.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Link: https://lore.kernel.org/r/20251001-video_zynqmp-v1-1-34f1e59b9c34@linaro.org
Signed-off-by: Michal Simek <michal.simek@amd.com>
drivers/video/zynqmp/zynqmp_dpsub.c