]> git.baikalelectronics.ru Git - kernel.git/commit
drm: rcar-du: Fix crash in encoder failure error path
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Mon, 3 Oct 2016 17:03:22 +0000 (20:03 +0300)
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Mon, 14 Nov 2016 01:35:14 +0000 (03:35 +0200)
commitc037993a70dfc792a089cec8b3ba3e199848ef75
tree9359a2c5dcc2d83f0062667b289bfe9d7d673357
parent4d3ae72979dd82c710f9912511a56de57e5ab0a3
drm: rcar-du: Fix crash in encoder failure error path

When an encoder fails to initialize the driver prints an error message
to the kernel log. The message contains the name of the encoder's DT
node, which is NULL for internal encoders. Use the of_node_full_name()
macro to avoid dereferencing a NULL pointer, print the output number to
add more context to the error, and make sure we still own a reference to
the encoder's DT node by delaying the of_node_put() call.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
drivers/gpu/drm/rcar-du/rcar_du_kms.c