Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9129373pxu; Mon, 28 Dec 2020 07:20:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJyJWSFLIh/ZjOdb7DDC5IQPnDsg7rJYdRvYbUnQbaa945v5bl0v3l5QyNvZninBNnWSuAmO X-Received: by 2002:a17:906:195a:: with SMTP id b26mr41572810eje.4.1609168818465; Mon, 28 Dec 2020 07:20:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609168818; cv=none; d=google.com; s=arc-20160816; b=tBw+200D/9EAX5Le1gRCorp8cwKJp6a4/S+QTSfqpuF08nlA0lkCOp3eiaHBJFgsSa Oe8Ky7Dq9mowhg7JoWkVCE01uRhh8vqeHzHbpjhUraQq7bzW7KkVrlNjM0j8Qv3n1TxV e6aikJV4J4eBNRpIqSYaNnV61LPug4/YTMAYkTzJh8q4ZLWv7i5zJ25DVXeGFg33dY+3 M/FY0W1ApYsl4bxuFlvWsFwyjmeYFFfRUSrC0Ieyojojci/H5b1uZUmc4A8ciBDOuYmU g0Axyfzr+qdQF4YH7bNLbZNWYDvB1BgkC7hsN/a564S8T+Il6kis4FJpImp+DXQiz51n o0Yg== 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=HiwGDAbHlxmUdw5QmzbS7MnFVQnEITEaYSsW7iAPnSg=; b=RaAc4NrypGQQnOPNza7wC43RbaGMSGmXiIIxkK0qYuA//niVy43zRTn2qe3ONm1uNx P1qEL7g31RdMkEJWAJTq3ZLySU7OJf6Cc1VDa52pPhb8I61n/uH5dXUy4LX8v6nY+sjC IG3Wd5WJClrWvB9soC2RoW9bQVCYBC4/brCnUwVRk/HpqUS2R7kH/g9j4t28n6udbSNm xwYMFKTiLX/5hl+56ITUCezRSRHzlZUyPEl1VRzn9PynbvqFgNthVGVs51wFWNlRLikG flodkdhA6eYyMA8TE20Xd9fBVDqgsDbEMTXWuN9SGr0JNkteXuh039jtHDQdhCDwdGAd Ox5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=WRc4XhyP; 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 b15si10321932ejc.100.2020.12.28.07.19.55; Mon, 28 Dec 2020 07:20:18 -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=WRc4XhyP; 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 S2437464AbgL1OEp (ORCPT + 99 others); Mon, 28 Dec 2020 09:04:45 -0500 Received: from mail.kernel.org ([198.145.29.99]:38578 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2437407AbgL1OEh (ORCPT ); Mon, 28 Dec 2020 09:04:37 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id A3422207B2; Mon, 28 Dec 2020 14:04:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609164262; bh=MvwINwTEjv0gwNuT1fYEsw9EV77aWtaoNtaGfZNe9mI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WRc4XhyPpqLPQTXZEiZqd6BRp8bfcc425zect1+mYPB2LmSNfOYYjLRcDyp94TiRk dEP4/jELF2cMYdpxYaZNS6M9rM3vKMToSdpJPtyCyG5b4slLn/QDKJNL8gkljIVWUJ stEDFnaCJIGQFue8OzYoRm60H2QzOk25eu/n44mw= 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 119/717] media: platform: add missing put_device() call in mtk_jpeg_clk_init() Date: Mon, 28 Dec 2020 13:41:57 +0100 Message-Id: <20201228125026.663367165@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 f28a81a3b64270da3588174feff4628c36e0ff4e ] if of_find_device_by_node() succeeds, mtk_jpeg_clk_init() doesn't have a corresponding put_device(). Thus add put_device() to fix the exception handling for this function implementation. Fixes: 648372a87cee ("media: platform: Change the call functions of getting/enable/disable the jpeg's clock") 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-jpeg/mtk_jpeg_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c b/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c index 227245ccaedc7..106543391c460 100644 --- a/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c +++ b/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c @@ -1306,6 +1306,7 @@ static int mtk_jpeg_clk_init(struct mtk_jpeg_dev *jpeg) jpeg->variant->clks); if (ret) { dev_err(&pdev->dev, "failed to get jpeg clock:%d\n", ret); + put_device(&pdev->dev); return ret; } -- 2.27.0