From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8DFCCC433E2 for ; Wed, 16 Sep 2020 00:16:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4B12D20739 for ; Wed, 16 Sep 2020 00:16:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600215375; bh=apKhv+XvUSd2IfBIShkx30TH2Ge3GyUhTuauodOzHrk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=NESBVLQgRUqYhxPV01xozc16YG/HtC5RIKp6MFKplEvfHaQPw0ENgyt/2SPEQcTJ5 /9ggSyZoWqEFAxHPjcmzIkMqaa5Ugpf78eClbyyO3GWCUMe8BzjV7XHZyU2rzPQ7Op 2uVljkD8DlT4pa9q25WhFykm0WehvA5cKjSSG158= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726906AbgIPAPx (ORCPT ); Tue, 15 Sep 2020 20:15:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:38306 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726917AbgIOOYz (ORCPT ); Tue, 15 Sep 2020 10:24:55 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F1C6D22248; Tue, 15 Sep 2020 14:18:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600179521; bh=apKhv+XvUSd2IfBIShkx30TH2Ge3GyUhTuauodOzHrk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RI4d7bqUT66AKzrpui900/wV0x7QAfuRBlPiRsuiBUmwdJHcVwI3e4g11iN3eyj6V wRc6j+3iENIFXn0J3w+Cal2GqtgBFMR+nEG6QAK1GYeiSu64fh9d1OsQKB6MgSQu5D dFbWa7QdUNGk/UomBTG4x+GknpmvfrgL2B+RYLBc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yu Kuai , Maxime Ripard , Sasha Levin Subject: [PATCH 5.4 014/132] drm/sun4i: add missing put_device() call in sun8i_r40_tcon_tv_set_mux() Date: Tue, 15 Sep 2020 16:11:56 +0200 Message-Id: <20200915140644.777833321@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915140644.037604909@linuxfoundation.org> References: <20200915140644.037604909@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Yu Kuai [ Upstream commit 07b5b12d97dc9f47ff3dff46c4f944a15bd762e5 ] If sun8i_r40_tcon_tv_set_mux() succeed, sun8i_r40_tcon_tv_set_mux() 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 Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20200826010826.1785487-1-yukuai3@huawei.com Signed-off-by: Sasha Levin --- 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 0f7eafedfe8f5..ae7ae432aa4ab 100644 --- a/drivers/gpu/drm/sun4i/sun4i_tcon.c +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c @@ -1409,14 +1409,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.1