Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9244577pxu; Mon, 28 Dec 2020 10:16:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJwyszJp0uVGgrvE4j/dS+8aTt9Zb4JSkomERy5AgfhH2W31M6Tli5DWgTB3SeP25Q5nfEmq X-Received: by 2002:aa7:c884:: with SMTP id p4mr42543344eds.72.1609179414185; Mon, 28 Dec 2020 10:16:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609179414; cv=none; d=google.com; s=arc-20160816; b=IjBKWYJ1Ht4Bj5txcjqSlrrcagSOgviS+106OiZaTVsvHXqwcG9l3sm8cI7XeWjVL9 /T7T7MUF1vMwoB7Ppx/Bv/JDWhwir9EYvco2y4Eubu3pig32MQw6b+l9/bsQaai0k4gP onQF7OAF5Vt7VW1vN3gKtylUZqtjVq9DTDLZKrJHC8GdJgp6VJSMdrdqCE2A+61D8C3P ZgdKrvfXy+KDr8+elv2E+r4pjvcpbiBFMWVo0coEVMNXeXXwDWKZzKNpU8iyUG5XceOZ p/nPdMuOpuOIWlY0wLc1VOMqA0OiQoao9AYKI/b6Lyq5Bd68JmT6/iQlT7AIMzfzv6lT ElMA== 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=LETsgiU4QEQgXp6AEn3tU3WqGGzuQuO9qW7nIuYrg//0NKsbQt+bgw7yEnX/jJ+UUl H1GortHGQUiRW0+/LmAday86oSyfl4G6q4U+Av1DXtIakAZ6M7VsJQ2PDaxpDXHbIPgQ bngGQv2ltQGwypcQsTbyKlsr3lQlOm+a5N9oLOY3uhcm22c73Mg/EHkC/HpoapWuyndH CtU8sa0GWTsqU35YK8zdBJU4c0/1dQDuoqhpS4aOxF1pGmtoKQPq4H5H0Oio7wZ15mW5 9U4yUQlBV2L6gVQMGjB34opVaa2rae/vVprS1XwIuKXRixLUq2lvYX7lLnG22csaXPDa sD/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=p12txIVB; 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 l8si17999946ejp.707.2020.12.28.10.16.32; Mon, 28 Dec 2020 10:16:54 -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=p12txIVB; 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 S2389667AbgL1N1m (ORCPT + 99 others); Mon, 28 Dec 2020 08:27:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:54730 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389380AbgL1N0R (ORCPT ); Mon, 28 Dec 2020 08:26:17 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 848A5206ED; Mon, 28 Dec 2020 13:26:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609161962; bh=O4CSAGa5Z9/miuUnMjw8DLTlmpWSSZZ/K5bZIbYNyNg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=p12txIVBG3ILFyJW1eCAopshORhSH4dtWdihJGFCAfA/5QdCvrHXYFR2Nj6ZQHwo1 hlHUUb5iVL64PppblnRmONuH9rkggITf0VuRvZ6d6C87/AwGTKWXsY3ZsOigK/mvtc Ng3WgUIbre+pvzL/wHMJEJlkVPWT1DpYmEC9vzWs= 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.19 141/346] media: mtk-vcodec: add missing put_device() call in mtk_vcodec_release_dec_pm() Date: Mon, 28 Dec 2020 13:47:40 +0100 Message-Id: <20201228124926.598900199@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124919.745526410@linuxfoundation.org> References: <20201228124919.745526410@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