Re: [PATCH] drm/vc4: fix ref count leak in vc4_dsi_encoder_enable

From: Markus Elfring
Date: Sun Jun 14 2020 - 08:17:21 EST


> in vc4_dsi_encoder_enable, the call to pm_runtime_get_sync increments
> the counter even in case of failure, leading to incorrect
> ref count. In case of failure, decrement the ref count before returning.

* Can the term âreference countâ become relevant also for this commit message
besides other possible adjustments?

* Can it be nicer to combine proposed updates for this software module
as a patch series (with a cover letter)?

* Would you like to add the tag âFixesâ?


â
> +++ b/drivers/gpu/drm/vc4/vc4_dsi.c
â
> @@ -1088,6 +1088,8 @@ static void vc4_dsi_encoder_enable(struct drm_encoder *encoder)
> dev_info(&dsi->pdev->dev, "DSI regs after:\n");
> drm_print_regset32(&p, &dsi->regset);
> }
> +out:
> + pm_runtime_put(dev);
> }
â

* Perhaps use the label âput_runtimeâ instead?

* Do you propose to perform an additional function call always
(and not only according to failure cases)?

* How do you think about calling the function âpm_runtime_put_noidleâ?

Regards,
Markus