Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2905320pxa; Tue, 25 Aug 2020 06:38:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyE4s0524VqfADe02UT5NLEDquQeWhC8r4VXhlFHVi4YxTdNQiLotLHm7uj/Yk4orjo7R6x X-Received: by 2002:a17:906:d935:: with SMTP id rn21mr11002372ejb.145.1598362688308; Tue, 25 Aug 2020 06:38:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598362688; cv=none; d=google.com; s=arc-20160816; b=aF0DAe+ZI0cUhinbeZIIXosHQ2F4ZSV8ndsraR5UTr5rA1GQZkzHl0NzzM1K1oax4O vgYK68sGzXE3x1mQNLpPX1uujCuIrlRnm7qbFp7uyL+MNS0azl9QspnyxTo6e5Nma/8G xLysSjleLeFgjjeJ+Rc36UBk0QEuNrFjr+jsTQATVVKRbin24GzFL2OPzfnTMaSMAgTU Wik/hSW5o8+9hCtrdXGtd761LIMvi+4jzKGU8xv8z3qUvWyR4Rgv5HppTGtfcXZWAdeQ z4SX0ku0USVFkaTRnXLi/FR/0YpZkdlBOES21h3mIcnfYwKWx7MERzAY6UmqRa4+YGz8 jCvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=qYU7tITMobbvpXo9jkdKSUln/9fMO4S5qke4nXhI2YQ=; b=m/FZztmFY8vIblcn7VBe5MWP5hBlSZigula3EU7KDbtlpuznJ53E+O9g1B9NoOuDSm LDpKbxyb4ZQyay0VPwjeKDhuCmAed2deLcEE9rsg2EqXoxUmHQE64gH0ef9fdysf2mjz ytNQ5mW6Xk04AJ8TsDsvmMM5f+pPHmgvlzetzUF8SH3SlA4LyAqAaeON7hcJ5YhuPce5 PjWSZP77RUM/aG9S1dlI+3Pe2H+PB4PCc7SHJqxtRWka8tJebAE7h82BL/83uhfZ6CzI 7/Tb05HcocnTsp3eaZv/6M8PpyZfKW8GMf78OWt+/0v5t3WDhG3oYZLOHhQ201yqPjTP uvLA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u1si9325085edp.392.2020.08.25.06.37.37; Tue, 25 Aug 2020 06:38:08 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729500AbgHYMGU (ORCPT + 99 others); Tue, 25 Aug 2020 08:06:20 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:52696 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728581AbgHYMGJ (ORCPT ); Tue, 25 Aug 2020 08:06:09 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 3DA6F8EFAF073BB64FFC; Tue, 25 Aug 2020 20:06:00 +0800 (CST) Received: from huawei.com (10.175.127.227) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.487.0; Tue, 25 Aug 2020 20:05:53 +0800 From: Yu Kuai To: , , , , , , , , , , , , , CC: , , , , , Subject: [PATCH 2/2] ASoC: fsl: imx-es8328: add missing put_device() call in imx_es8328_probe() Date: Tue, 25 Aug 2020 20:05:31 +0800 Message-ID: <20200825120531.1479304-3-yukuai3@huawei.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200825120531.1479304-1-yukuai3@huawei.com> References: <20200825120531.1479304-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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org if of_find_device_by_node() succeed, imx_es8328_probe() doesn't have a corresponding put_device(). Thus add a jump target to fix the exception handling for this function implementation. Fixes: 7e7292dba215 ("ASoC: fsl: add imx-es8328 machine driver") Signed-off-by: Yu Kuai --- sound/soc/fsl/imx-es8328.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sound/soc/fsl/imx-es8328.c b/sound/soc/fsl/imx-es8328.c index 8f71ed3a6f75..a3f121939a83 100644 --- a/sound/soc/fsl/imx-es8328.c +++ b/sound/soc/fsl/imx-es8328.c @@ -145,7 +145,7 @@ static int imx_es8328_probe(struct platform_device *pdev) data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL); if (!data) { ret = -ENOMEM; - goto fail; + goto put_device; } comp = devm_kzalloc(dev, 3 * sizeof(*comp), GFP_KERNEL); @@ -204,6 +204,8 @@ static int imx_es8328_probe(struct platform_device *pdev) kfree(comp); free_data: kfree(data); +put_device: + put_device(&ssi_pdev->dev); fail: of_node_put(ssi_np); of_node_put(codec_np); -- 2.25.4