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=-12.7 required=3.0 tests=BAYES_00, 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 885BCC43457 for ; Fri, 9 Oct 2020 12:34:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 52AAB22284 for ; Fri, 9 Oct 2020 12:34:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387467AbgJIMeD (ORCPT ); Fri, 9 Oct 2020 08:34:03 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:47682 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731677AbgJIMd6 (ORCPT ); Fri, 9 Oct 2020 08:33:58 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 462FA7DF8F74857B5728; Fri, 9 Oct 2020 20:33:51 +0800 (CST) Received: from huawei.com (10.175.127.227) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.487.0; Fri, 9 Oct 2020 20:33:42 +0800 From: Yu Kuai To: , , , , , , , , , , CC: , , , , , Subject: [PATCH 1/7] media: platform: add missing put_device() call in mtk_jpeg_clk_init() Date: Fri, 9 Oct 2020 20:37:58 +0800 Message-ID: <20201009123804.3977562-2-yukuai3@huawei.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20201009123804.3977562-1-yukuai3@huawei.com> References: <20201009123804.3977562-1-yukuai3@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.127.227] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org if of_find_device_by_node() succeed, 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 --- 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 227245ccaedc..106543391c46 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.25.4