drm/kmb: Use common error handling code in kmb_probe()
Subsystems (3)
PATCH 1/1 drm/kmb: Use common error handling code in kmb_probe()
From: Markus Elfring <[email protected]>
Date: Thu, 3 Oct 2024 13:20:05 +0200
Add a label so that a bit of exception handling can be better reused in a subsequent if branch of this function implementation.
This issue was detected by using the Coccinelle software.
Signed-off-by Markus Elfring <[email protected]>
--- drivers/gpu/drm/kmb/kmb_drv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/kmb/kmb_drv.c +3 -3
@@ -498,16 +498,16 @@ static int kmb_probe(struct platform_device *pdev) } dsi_node =of_graph_get_remote_port_parent (dsi_in);if (!dsi_node) { -of_node_put (dsi_in);DRM_ERROR ("Failed to get dsi node from DT\n" ); -return -EINVAL ; + goto err_put_dsi_in; } dsi_pdev =of_find_device_by_node (dsi_node);if (!dsi_pdev) { -of_node_put (dsi_in);of_node_put (dsi_node);DRM_ERROR ("Failed to get dsi platform device\n" ); +err_put_dsi_in: +of_node_put (dsi_in);return -EINVAL ; }
--
2.46.1