linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/sun4i: add missing put_device() call in sun8i_r40_tcon_tv_set_mux()
@ 2020-08-25 11:44 Yu Kuai
  2020-08-25 13:38 ` Maxime Ripard
  0 siblings, 1 reply; 3+ messages in thread
From: Yu Kuai @ 2020-08-25 11:44 UTC (permalink / raw)
  To: mripard, wens, airlied, daniel, jernej.skrabec
  Cc: dri-devel, linux-arm-kernel, linux-kernel, yukuai3, yi.zhang

If sun8i_r40_tcon_tv_set_mux() succeed, at_dma_xlate() doesn't have a
corresponding put_device(). Thus add put_device() to fix the exception
handling for this function implementation.

Fixes: 0305189afb32 ("drm/sun4i: tcon: Add support for R40 TCON")
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
---
 drivers/gpu/drm/sun4i/sun4i_tcon.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c
index ced9a8287dd8..e40c542254f6 100644
--- a/drivers/gpu/drm/sun4i/sun4i_tcon.c
+++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c
@@ -1433,14 +1433,18 @@ static int sun8i_r40_tcon_tv_set_mux(struct sun4i_tcon *tcon,
 	if (IS_ENABLED(CONFIG_DRM_SUN8I_TCON_TOP) &&
 	    encoder->encoder_type == DRM_MODE_ENCODER_TMDS) {
 		ret = sun8i_tcon_top_set_hdmi_src(&pdev->dev, id);
-		if (ret)
+		if (ret) {
+			put_device(&pdev->dev);
 			return ret;
+		}
 	}
 
 	if (IS_ENABLED(CONFIG_DRM_SUN8I_TCON_TOP)) {
 		ret = sun8i_tcon_top_de_config(&pdev->dev, tcon->id, id);
-		if (ret)
+		if (ret) {
+			put_device(&pdev->dev);
 			return ret;
+		}
 	}
 
 	return 0;
-- 
2.25.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/sun4i: add missing put_device() call in sun8i_r40_tcon_tv_set_mux()
  2020-08-25 11:44 [PATCH] drm/sun4i: add missing put_device() call in sun8i_r40_tcon_tv_set_mux() Yu Kuai
@ 2020-08-25 13:38 ` Maxime Ripard
  2020-08-26  1:04   ` yukuai (C)
  0 siblings, 1 reply; 3+ messages in thread
From: Maxime Ripard @ 2020-08-25 13:38 UTC (permalink / raw)
  To: Yu Kuai
  Cc: wens, airlied, daniel, jernej.skrabec, dri-devel,
	linux-arm-kernel, linux-kernel, yi.zhang

Hi,

On Tue, Aug 25, 2020 at 07:44:03PM +0800, Yu Kuai wrote:
> If sun8i_r40_tcon_tv_set_mux() succeed, at_dma_xlate() doesn't have a
> corresponding put_device(). Thus add put_device() to fix the exception
> handling for this function implementation.
> 
> Fixes: 0305189afb32 ("drm/sun4i: tcon: Add support for R40 TCON")
> Signed-off-by: Yu Kuai <yukuai3@huawei.com>

That doesn't sound right, we're not using at_dma_xlate at all in that
driver?

Maxime

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/sun4i: add missing put_device() call in sun8i_r40_tcon_tv_set_mux()
  2020-08-25 13:38 ` Maxime Ripard
@ 2020-08-26  1:04   ` yukuai (C)
  0 siblings, 0 replies; 3+ messages in thread
From: yukuai (C) @ 2020-08-26  1:04 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: wens, airlied, daniel, jernej.skrabec, dri-devel,
	linux-arm-kernel, linux-kernel, yi.zhang

On 2020/08/25 21:38, Maxime Ripard wrote:
> Hi,
> 
> On Tue, Aug 25, 2020 at 07:44:03PM +0800, Yu Kuai wrote:
>> If sun8i_r40_tcon_tv_set_mux() succeed, at_dma_xlate() doesn't have a
>> corresponding put_device(). Thus add put_device() to fix the exception
>> handling for this function implementation.
>>
>> Fixes: 0305189afb32 ("drm/sun4i: tcon: Add support for R40 TCON")
>> Signed-off-by: Yu Kuai <yukuai3@huawei.com>
> 
> That doesn't sound right, we're not using at_dma_xlate at all in that
> driver?
> 

Hi!

sry about that, should be sun8i_r40_tcon_tv_set_mux(), same as the
title said.

Best regards,
Yu Kuai


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-08-26  1:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-25 11:44 [PATCH] drm/sun4i: add missing put_device() call in sun8i_r40_tcon_tv_set_mux() Yu Kuai
2020-08-25 13:38 ` Maxime Ripard
2020-08-26  1:04   ` yukuai (C)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).