Message ID | 591377f6-1926-49df-a1cf-6b621244a710@web.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/kmb: Use common error handling code in kmb_probe() | expand |
diff --git a/drivers/gpu/drm/kmb/kmb_drv.c b/drivers/gpu/drm/kmb/kmb_drv.c index 169b83987ce2..2680afa684a2 100644 --- a/drivers/gpu/drm/kmb/kmb_drv.c +++ b/drivers/gpu/drm/kmb/kmb_drv.c @@ -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; }