From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DCB7447CA7E; Sat, 12 Sep 2026 12:48:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789217322; cv=none; b=bAek+3pNl+KYTOyyaI4Bg483rkcZ2lmrMNqbDPwrGdzheuKWWvMadIyj3/J3+kaIP0wzQUCL3QN41bMuXwAIpHHxTtFsM2lEq3ABa2NlUSEEfQR0dRUmFS5gV11JsE7fyWhqjb1dMIdKaeZu23msoikDdRy2ckVeK6cCGh3oe+c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789217322; c=relaxed/simple; bh=MEgmlRh7eNKt+O4bJugjdEj8NkiIRKclsGCl9C/QP4A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CzHlcP5S5TY6hrt9LQak0llFrPayf+dCilCfJsJqMRCJLsHxvxrGZHSyzEKDBXJ37LZZ+l1VLBEo6QkmsF8CfahCSbjONSlXC/UuEey7J+/WpGXpD1jlyWE/53MYM9n2l7LMdRt76M4Y9cjMuUTCf42Ii+Wpc/0A01pGtk4zRv8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=y/AuCoEJ; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="y/AuCoEJ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 96B161F000FF; Sat, 12 Sep 2026 12:48:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789217320; bh=uB6ALj1xD1nejujiD+PcXedB5Lvi4MBPNJqz5sOHEss=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=y/AuCoEJ+6AYVdEsh/kUNP6INYeFf3RU04Jc/w6zO8G9dPcTAZ3NOh4peDs7B9GKL DwXEmNDDGYHFP65srX1D4KDgUXE9v/msmJjxaJPKTxq+VkPq5Y4RYPx1CTyEAasGRg /33NPiGeadU2SaM5GBZYTUsNtza/qh+trckOfPhk= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Jernej Skrabec , Chen-Yu Tsai , Sasha Levin Subject: [PATCH 6.12 0916/1376] drm/sun4i: tcon: Drop TCON TOP device reference Date: Sat, 12 Sep 2026 08:55:42 +0200 Message-ID: <20260912065627.981374158@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065607.535295758@linuxfoundation.org> References: <20260912065607.535295758@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jernej Skrabec [ Upstream commit 8208832a38ff3d2560eb8a77a9d7a2f17d8ebcdc ] of_find_device_by_node() takes a device reference. Drop it after mux configuration succeeds. Fixes: 0305189afb32 ("drm/sun4i: tcon: Add support for R40 TCON") Signed-off-by: Jernej Skrabec Acked-by: Chen-Yu Tsai Link: https://patch.msgid.link/871a3108086c15a483eef23301984c8d2254dfa7.1785772659.git.jernej.skrabec@gmail.com Signed-off-by: Chen-Yu Tsai Signed-off-by: Sasha Levin --- drivers/gpu/drm/sun4i/sun4i_tcon.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c index 1b710013b9cb3..901e84de5aef9 100644 --- a/drivers/gpu/drm/sun4i/sun4i_tcon.c +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c @@ -1409,7 +1409,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 */ @@ -1432,21 +1432,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 = { -- 2.53.0