drm/bridge: it6505: Move a variable assignment behind a null pointer check in receive...
authorMarkus Elfring <elfring@users.sourceforge.net>
Sun, 16 Apr 2023 15:30:46 +0000 (17:30 +0200)
committerRobert Foss <rfoss@kernel.org>
Fri, 28 Apr 2023 17:26:24 +0000 (19:26 +0200)
commit0be05a75de2916421e88e0d64b001984f54df0bd
tree27c40d9c09caacaef4e31091b08edb6b8f7d1c16
parent99e7e3b60080d913ff2f94943f4af1f1b76a1c06
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: b5c84a9edcd4 ("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>
drivers/gpu/drm/bridge/ite-it6505.c