Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9430376pxu; Mon, 28 Dec 2020 16:16:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJxFIKMr/HTn6ZAnHD4yMgo9WAcpLL8CmkVTxb7rUSW8FbJBua07E4m73ALO/USFJt3OLT4U X-Received: by 2002:a17:907:720e:: with SMTP id dr14mr43692931ejc.303.1609200964244; Mon, 28 Dec 2020 16:16:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609200964; cv=none; d=google.com; s=arc-20160816; b=RyZD2kKPoR1igSl9lAHk41y9UUcXbVCbODDURZCR94Bm0e/cD3UdR2UacrHyCAameQ OSrmVQaooFFxAvYUztqtle86j1WN3fV9Np99suo3kzBMzR5NDLnrWnHUeDqEFL2FbyPf oC0DXQg/8qnkoEWvek78/2EQjzrmZgHvBZELMqg4u+hsKm2jOHYdnmluLEhY/qQ2598M 5aWP+BUs7FrHedEkgaNiGm5jv3pk2U78+0Twf8SFmRlV19NFX1ieSfjZYNk3xTwJH2tl f2+DZji7mk84ZCO9tcjU/zV/kswDOjtArn6MRwY3iWMyWdKAutbz2vDkcAD/Jamh3/aN BRCQ== 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=+TiJukZkKPwxvnC/6+lY4WYWy3iXdX1qOAVmK/K1snA=; b=Z3CMuVCK7PZMCzpeekHJAg+0e4fG7gaeST9dpKUID9+N02IfkgM88UOlkD9Fw4T3eH rGy3DR//rlThRjY9phWkT9rgj//bw/0jzAo1uSXplIVVnC2B5wuAebxuuR9lpwTb9WLp QOgHOuuiJW4UTiFP9qbtX12PO+GOiKBSJOmAnacNZNJFv2oA5jlxNBjAaESFDxcnK1X+ inWKqsf5dkvlwB+ahm3BjCjXrUbrewUQ9CAvsCfJz5Iwlm2M83MOfqs0phJqm6/zcRUU Z8a3C9yB/AthngN+mAIWoIS66XzJLHe0QqaGoVs0cDfFU9FIlIJBMQXQnzmcJUJzAv00 qEXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="rglnN/lm"; 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 x17si23902979edq.154.2020.12.28.16.15.42; Mon, 28 Dec 2020 16:16:04 -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="rglnN/lm"; 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 S2439900AbgL1PPr (ORCPT + 99 others); Mon, 28 Dec 2020 10:15:47 -0500 Received: from mail.kernel.org ([198.145.29.99]:38734 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2437447AbgL1OEn (ORCPT ); Mon, 28 Dec 2020 09:04:43 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4A515205CB; Mon, 28 Dec 2020 14:04:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609164267; bh=N8GM+ulIniznlNxQOZ+Jfb1PaPyiKuyr6CI3OTguG10=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rglnN/lm97Tf0w+zcJDbOBa/gm2fAA5Mhq/uKTAIh41+MxZIL/4ccKjXc2aAxdJpw rWUniNWS0c6NLWkKYiu1tTX1FbFVjpVCrZKRa9/vbrM2SaG/Jnq7Ac7VPpDIgatjda BptHI+2b/eueiAK/7GqwDRsbvo9fzd19mDbOzjOM= 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 5.10 121/717] media: mtk-vcodec: add missing put_device() call in mtk_vcodec_release_dec_pm() Date: Mon, 28 Dec 2020 13:41:59 +0100 Message-Id: <20201228125026.760557664@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@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 f6a6b42865fbd..ddee7046ce422 100644 --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_pm.c +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_pm.c @@ -85,6 +85,7 @@ put_device: 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