Message ID | 504bb76d-d8ee-4332-ab3d-ad6b2482c29c@web.de (mailing list archive) |
---|---|
State | New |
Delegated to: | Kieran Bingham |
Headers | show |
Series | drm: rcar-du: Reduce of_node_put(cmm) calls in rcar_du_cmm_init() | expand |
diff --git a/drivers/gpu/drm/renesas/rcar-du/rcar_du_kms.c b/drivers/gpu/drm/renesas/rcar-du/rcar_du_kms.c index 70d8ad065bfa..a854b2b085f9 100644 --- a/drivers/gpu/drm/renesas/rcar-du/rcar_du_kms.c +++ b/drivers/gpu/drm/renesas/rcar-du/rcar_du_kms.c @@ -792,14 +792,12 @@ static int rcar_du_cmm_init(struct rcar_du_device *rcdu) } pdev = of_find_device_by_node(cmm); + of_node_put(cmm); if (!pdev) { dev_err(rcdu->dev, "No device found for CMM%u\n", i); - of_node_put(cmm); return -EINVAL; } - of_node_put(cmm); - /* * -ENODEV is used to report that the CMM config option is * disabled: return 0 and let the DU continue probing.