From patchwork Wed Apr 24 17:08:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 10915303 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 44C2C922 for ; Wed, 24 Apr 2019 17:11:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2800228BAD for ; Wed, 24 Apr 2019 17:11:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1BE3028BB8; Wed, 24 Apr 2019 17:11:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DA30028BBD for ; Wed, 24 Apr 2019 17:11:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xPKosfSrJKAUhpzqx1YtYuqtQ3D3YZZpL9wOwzmQbNw=; b=auINq8w82sa4Q3 52pn6ZSVTYB3WHIo/khmsMKObMRBeId0XsAqg5SGpxVGG3IJA++czmjEhIo3XYo14l2R1WZ7/QL8H VvQfUsxyRI6SBaBt5Cq0tBXMBrIwQMSqCmeG0VWbeSeiIHHUGsdy98RqIKR41PiS2m29UoHHEdDRG zivXZoEdblAfqh6VpGO4Eec9WAK0HuzxhN8GIFU/jrPQkWAN+vfsNK1hrRJ8Om4rVQvw+ZK0hkzKw TMpCGzPuP8V0D+23sC8QJ0jK+ARQWhJBXQNUoHl1crJOhCf/GYfw6FezoGDCqVG5SpqoN6KVWe5gv OX/CUKD4yfUQ+/BM9DjQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hJLQn-0004sc-BW; Wed, 24 Apr 2019 17:11:37 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hJLQk-0004rX-6C for linux-arm-kernel@lists.infradead.org; Wed, 24 Apr 2019 17:11:35 +0000 Received: from localhost (62-193-50-229.as16211.net [62.193.50.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D927621904; Wed, 24 Apr 2019 17:11:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556125893; bh=f6nNvR/dhl28VTdhBQtdGA6nHMkHoMHIHf7qzOm2ePk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xy5aQXNDWaDyEwHt2a09YlF+U8kp19/iZLGkN/ohau+RylRZARKMTgkXCSZMm366T 7bF04u1fqNzyzQJ9kRqqAk+ZOSUROJQ9HXNR2M4tbXDmxA4QMA0yxD0DQAJC2aznXH ukfIEQNrfGPekj1/yar8lCmc5X4CJBxMH6QmSdFk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Subject: [PATCH 3.18 020/104] SoC: imx-sgtl5000: add missing put_device() Date: Wed, 24 Apr 2019 19:08:37 +0200 Message-Id: <20190424170853.070320830@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190424170839.996641496@linuxfoundation.org> References: <20190424170839.996641496@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190424_101134_247008_6740807C X-CRM114-Status: GOOD ( 10.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sasha Levin , alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, Timur Tabi , Xiubo Li , Greg Kroah-Hartman , Sascha Hauer , Takashi Iwai , Liam Girdwood , stable@vger.kernel.org, Jaroslav Kysela , Nicolin Chen , Mark Brown , NXP Linux Team , Pengutronix Kernel Team , Wen Yang , Shawn Guo , Fabio Estevam , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP [ Upstream commit 8fa857da9744f513036df1c43ab57f338941ae7d ] The of_find_device_by_node() takes a reference to the underlying device structure, we should release that reference. Detected by coccinelle with the following warnings: ./sound/soc/fsl/imx-sgtl5000.c:169:1-7: ERROR: missing put_device; call of_find_device_by_node on line 105, but without a corresponding object release within this function. ./sound/soc/fsl/imx-sgtl5000.c:177:1-7: ERROR: missing put_device; call of_find_device_by_node on line 105, but without a corresponding object release within this function. Signed-off-by: Wen Yang Cc: Timur Tabi Cc: Nicolin Chen Cc: Xiubo Li Cc: Fabio Estevam Cc: Liam Girdwood Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: NXP Linux Team Cc: alsa-devel@alsa-project.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/fsl/imx-sgtl5000.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/fsl/imx-sgtl5000.c b/sound/soc/fsl/imx-sgtl5000.c index 1cb22dd034eb..110f3cf361af 100644 --- a/sound/soc/fsl/imx-sgtl5000.c +++ b/sound/soc/fsl/imx-sgtl5000.c @@ -115,6 +115,7 @@ static int imx_sgtl5000_probe(struct platform_device *pdev) ret = -EPROBE_DEFER; goto fail; } + put_device(&ssi_pdev->dev); codec_dev = of_find_i2c_device_by_node(codec_np); if (!codec_dev) { dev_err(&pdev->dev, "failed to find codec platform device\n");