drm/bridge: it6505: Move a variable assignment behind a null pointer check in receive_timing_debugfs_show()

The address of a data structure member was determined before
a corresponding null pointer check in the implementation of
the function “receive_timing_debugfs_show”.

Thus avoid the risk for undefined behaviour by moving the assignment
for the variable “vid” behind the null pointer check.

This issue was detected by using the Coccinelle software.

Fixes: b5c84a9edc ("drm/bridge: add it6505 driver")
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Link: https://patchwork.freedesktop.org/patch/msgid/fa69384f-1485-142b-c4ee-3df54ac68a89@web.de
Reviewed-by: Robert Foss <rfoss@kernel.org>
Signed-off-by: Robert Foss <rfoss@kernel.org>
This commit is contained in:
Markus Elfring 2023-04-16 17:30:46 +02:00 • committed by Robert Foss
commit 0be05a75de
No known key found for this signature in database
GPG key ID: 3EFD900F76D1D784