Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp5649353img; Wed, 27 Mar 2019 12:25:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqzrSkt7FxAVtu3xhysujwHPS+u9XyU/GgjVK5ByEp3/xubwAVhSZ5BJTeMJyJM4GL5et8Ry X-Received: by 2002:a62:4586:: with SMTP id n6mr37172105pfi.43.1553714738598; Wed, 27 Mar 2019 12:25:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553714738; cv=none; d=google.com; s=arc-20160816; b=qhOykzJbyFIv1Tgd0nYIPOTWP8uY5em/yww6+4w2+06tNf1u00mioFWm5Xy8Fbm+tS zbjgDn1hNFYUTOzKxKYtGkbMv/WY2sTe0++f0TFZIeUMSo9oWYLzFm3+QdauSi0zkFdr +gN4bUwWc5O6co6tn7bfErN05Lfqge4IuWl0wOJABisVw6fCLQFd9g/tL+RZQjpRnlUl J3xZqrZfeQAnqgGuhfZE3tHGwWwube2P1suMPQGdxrF8baeLALLSE5OImRl3vY6YwM+W J778eAHtgKL8ZlJ5TQy/RlDstzSuI4ANvmot3zkcxcDTpfOL/BvtPrLF2uYT1W0EP2GJ SP8A== 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 :dkim-signature; bh=m4NFAfbnreRDWaQjUug5xoWmGHz/YFoTICm2YK/nQ9Y=; b=uEcaarMQeQEw2kRROY+a7xzzVM3VHHAxKZUGovwtGhZlfMr0rN0FF7eLPki2Q/mJ38 9c608iTvkxTynkC0IqRetXC9NujTK+uifXShqjtRrbrzP+cW45rptDoSclqIzzBZYizY AfNyohBAcMT/hYSlH8F2dBHur4BBRGuWt/Gmvzue/79JT4TU/GuUwRpwIhzYz0fCvJfQ 42H5OxwmLbmVVrDr1JekfyefpU+bVMzo/s3DhWzz7YecnHMoOq58LnVp7K36JdYLnGYU o1JBJon+KXuTmaVf1M+VxAKalU5dObKTeOI+GEQzt+OV0USYo30Wwwm/DWxd6LfxLV71 X6yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LCavE9D3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k91si20135502pld.87.2019.03.27.12.25.23; Wed, 27 Mar 2019 12:25:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LCavE9D3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387732AbfC0SFf (ORCPT + 99 others); Wed, 27 Mar 2019 14:05:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:46704 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387721AbfC0SFb (ORCPT ); Wed, 27 Mar 2019 14:05:31 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 72320217F9; Wed, 27 Mar 2019 18:05:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553709931; bh=TfJu8wyhrjGqEs8YMbzF5xb8e6sBLHmcYhsNjOCYKx8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LCavE9D3WEGTDgaVosLXqQE/YRwh1yh3RdhmUp4zXi6MV7iADlLmGwiC+IIUDRwZN O6lk3F7l68fibbr1hwtzD36ObACu90xMuy94ftksAN4lOYJ4e/H9a+/PxT3hdk7tA6 tOL3ukAHpqMDzhBmuy1IbVkbm9QkgYWRKGxo/A48= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Wen Yang , Timur Tabi , Nicolin Chen , Xiubo Li , Fabio Estevam , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , NXP Linux Team , alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, Sasha Levin Subject: [PATCH AUTOSEL 5.0 118/262] SoC: imx-sgtl5000: add missing put_device() Date: Wed, 27 Mar 2019 13:59:33 -0400 Message-Id: <20190327180158.10245-118-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190327180158.10245-1-sashal@kernel.org> References: <20190327180158.10245-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wen Yang [ 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 c29200cf755a..9b9a7ec52905 100644 --- a/sound/soc/fsl/imx-sgtl5000.c +++ b/sound/soc/fsl/imx-sgtl5000.c @@ -108,6 +108,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"); -- 2.19.1