Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9173734pxu; Mon, 28 Dec 2020 08:24:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJyVSUBO5TYJKbQfVOd15gxSxA8dvviEe5KIr258a0eMrTv4cyo9hK7noN4XYDrx80TdMg0m X-Received: by 2002:a17:907:1182:: with SMTP id uz2mr43149790ejb.183.1609172667245; Mon, 28 Dec 2020 08:24:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609172667; cv=none; d=google.com; s=arc-20160816; b=NufCot5qO/ncRz8Hq3bv1wTlrvhzhR1kyWaM1u6Q48P1tx926I5jDNyP2jCdzL3m0r MJKOri51Dwm5kF7OcwLWJhN5e69/QDdDIVzMDEN6YtGQQYFuyqTZjR+EyMKP6G51+DDX ssAi9nCIczfaH+hZ0mi/In4pQpIJEMAlGuvJPtNXrr2CHz9dj+eRC+/cHAcc/0Cpopvw KxPISnZIJLTFsnOnw0UF6SSWTgW5eE795AweZxpkoQyeS0yyxgz/OCNUy9kA74o9wNe0 opFmhXV3l+TYXWJN07AHEL4nfbr5heOC0O/JEo2f4Lt6/b6GcVQYWuJSfY3qbI4TtF+P onPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=P1kVJKlXH/P7DVIUiUhqv3lMCbh6zNVrnr6+Yf9TEeU=; b=E+jGrzQ5j6i/UrneL56qThNMwtFD20GzunEa5OKcf9Zhpcsj+HZ6kUAKbzjS0kOGSA P+mnw4HTN4TsbhLoDoEfGbo0jgEjSqW5LO9VWoWqagjx7PECDvMLCzf5lmIoxcBVn65m A2vWFhaRdtM0qbzb8kxQJ1eUW1ghBdRDtvmPBbAXcroU3QG4KbOQTi+cEfrDbGBaO/Q3 FBbfkzV4qWP70VEzSLLKn3gZvO3+VCglUO2/LkUEBTO2Aig27PMh4mbxA5whcbS2jgWJ zZx6qAVGc4pXFe354t7Trjhj6ePlF89evDNU93P4tZi0IgJqPLVNX8/xjRN7v4L0yicE U3HQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=SBQ2r0Ts; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b14si21088032edw.332.2020.12.28.08.24.02; Mon, 28 Dec 2020 08:24:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=SBQ2r0Ts; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732017AbgL1NMU (ORCPT + 99 others); Mon, 28 Dec 2020 08:12:20 -0500 Received: from mail.kernel.org ([198.145.29.99]:39816 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731924AbgL1NL7 (ORCPT ); Mon, 28 Dec 2020 08:11:59 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8787720776; Mon, 28 Dec 2020 13:11:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609161079; bh=O4CSAGa5Z9/miuUnMjw8DLTlmpWSSZZ/K5bZIbYNyNg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SBQ2r0TsOa881VFWm9z3GooNNKhUkfmmOYa3p7ioJ6qF7w5DotbmQUMXVx45ByyBM nrbIygWybvD/xyMsJYh2ERtHHnhbDUFD/fDJ8sURr5AFgfHz0FStW1nIXD0mS5KfR9 NRigDy/qBv/WN1AzdHwjgF+tmpYBEy41Hyz7Xxkc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yu Kuai , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 4.14 093/242] media: mtk-vcodec: add missing put_device() call in mtk_vcodec_release_dec_pm() Date: Mon, 28 Dec 2020 13:48:18 +0100 Message-Id: <20201228124909.276945504@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124904.654293249@linuxfoundation.org> References: <20201228124904.654293249@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yu Kuai [ Upstream commit 27c3943683f74e35e1d390ceb2e3639eff616ad6 ] mtk_vcodec_release_dec_pm() will be called in two places: a. mtk_vcodec_init_dec_pm() succeed while mtk_vcodec_probe() return error. b. mtk_vcodec_dec_remove(). In both cases put_device() call is needed, since of_find_device_by_node() was called in mtk_vcodec_init_dec_pm() previously. Thus add put_devices() call in mtk_vcodec_release_dec_pm() Fixes: 590577a4e525 ("[media] vcodec: mediatek: Add Mediatek V4L2 Video Decoder Driver") Signed-off-by: Yu Kuai Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_pm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_pm.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_pm.c index 79ca03ac449c3..3f64119e8c082 100644 --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_pm.c +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_pm.c @@ -103,6 +103,7 @@ int mtk_vcodec_init_dec_pm(struct mtk_vcodec_dev *mtkdev) void mtk_vcodec_release_dec_pm(struct mtk_vcodec_dev *dev) { pm_runtime_disable(dev->pm.dev); + put_device(dev->pm.larbvdec); } void mtk_vcodec_dec_pw_on(struct mtk_vcodec_pm *pm) -- 2.27.0