mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
drm/sun4i: tcon: Drop TCON TOP device reference
of_find_device_by_node() takes a device reference. Drop it after mux
configuration succeeds.
Fixes: 0305189afb ("drm/sun4i: tcon: Add support for R40 TCON")
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Acked-by: Chen-Yu Tsai <wens@kernel.org>
Link: https://patch.msgid.link/871a3108086c15a483eef23301984c8d2254dfa7.1785772659.git.jernej.skrabec@gmail.com
Signed-off-by: Chen-Yu Tsai <wens@kernel.org>
This commit is contained in:
parent
9c90199b39
commit
8208832a38
|
|
@ -1411,7 +1411,7 @@ static int sun8i_r40_tcon_tv_set_mux(struct sun4i_tcon *tcon,
|
|||
{
|
||||
struct device_node *port, *remote;
|
||||
struct platform_device *pdev;
|
||||
int id, ret;
|
||||
int id, ret = 0;
|
||||
|
||||
/* find TCON TOP platform device and TCON id */
|
||||
|
||||
|
|
@ -1434,21 +1434,20 @@ 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) {
|
||||
put_device(&pdev->dev);
|
||||
return ret;
|
||||
}
|
||||
if (ret)
|
||||
goto out_put_device;
|
||||
}
|
||||
|
||||
if (IS_ENABLED(CONFIG_DRM_SUN8I_TCON_TOP)) {
|
||||
ret = sun8i_tcon_top_de_config(&pdev->dev, tcon->id, id);
|
||||
if (ret) {
|
||||
put_device(&pdev->dev);
|
||||
return ret;
|
||||
}
|
||||
if (ret)
|
||||
goto out_put_device;
|
||||
}
|
||||
|
||||
return 0;
|
||||
out_put_device:
|
||||
put_device(&pdev->dev);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const struct sun4i_tcon_quirks sun4i_a10_quirks = {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user