Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp458330ybl; Tue, 28 Jan 2020 06:17:41 -0800 (PST) X-Google-Smtp-Source: APXvYqzuY2ZQ0GkgGrZJ0xItmQ8r7ApEYbAnREopQZZjjXjwYzrk0lWW8zVnsaidGUMJZC+geA7s X-Received: by 2002:aca:ad11:: with SMTP id w17mr3026165oie.85.1580221061375; Tue, 28 Jan 2020 06:17:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580221061; cv=none; d=google.com; s=arc-20160816; b=W+Dpb47dTwIrQ39taAy3fsc1tjn6WYORbI8tLCDzkU7iBEe/LR4E2IWqcI1Zql8Rcs W8LSS2u8kMCn50m6mrTTV5iEd3lB1NG4khdDWV1TpYl20zGWtBgbTq3mLc+j+sBrC5o6 VImKxlULeZJ5Hf3ybDUdcMqaUViNfgYLlnnVLPRsWS9yOoFOV2YO2Wh3l/qjhkwnuid/ 3y8LIC2PfQ9kUJD4VCagf9oT4pnsqwNWqM8REtDNfSZuWMqLym6fkKxRnPDHsj63xTEG ephQeM6dl1euMs3zU1G8dmr22Lx47AnVigIz6/lUYr6t+ZFNMmPneYtS3W4+wp4yRu+3 5btg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=r47pz35xRwxZIiSx4VgDA8TuG3VuqP8jp7A3cxqV4lk=; b=C4ZdJ7ly3d5Si4zIrXcf77/PqulsPPMHkaGa4xyFZUiAfIw+fbmu5dnP9VPdKfgheQ 0aiglAevUhMBopjz5Acmrhz8B8ekVFMzw0ZFRnDihxWbm6LJslfxG8+1+pQb+87jWnGb i3QpXmHk0jeCoR/io4Ft1Nr2YOIgTALc+0yMCgBasjhkZK7YjbgHzPkXvg6sLBhxHU7m BexeH5VvnDmtHQ7wLLxt0ATdlz076eItvjXiATum1MUZm5UGz/YPhx82gMZ5IFIXL7Av mIAzIVHs+KrYBo4IKejxaHr4UaSr6k/1czP6Wn3pBQnba61lYVlSYhclnwwnLI96PwYk kjtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RBZaYjKf; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q1si8493606oti.234.2020.01.28.06.17.27; Tue, 28 Jan 2020 06:17:41 -0800 (PST) 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=RBZaYjKf; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730320AbgA1OQc (ORCPT + 99 others); Tue, 28 Jan 2020 09:16:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:39934 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730077AbgA1OQa (ORCPT ); Tue, 28 Jan 2020 09:16:30 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 A919624692; Tue, 28 Jan 2020 14:16:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580220990; bh=5q3qoVVuTy8YvTWJS56/FshoR2Qy/XfFf6H6ywclMsE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RBZaYjKf6kNEjsUcCFGfggt/fqh+iTpi6ShaeO2QBMV9YrHY+YMMLnmNx4IGuQa09 cZKhzIusrHU92nM0eBBqttsDWAvV6WEbcEctOkjp5jh5JlcRsIrtvnQ/9J0HF4bgX1 mJ/reJqBcS640xmoyKfCOZtv0zIoc88KCe3WZ1FM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stefan Agner , Daniel Baluta , Nicolin Chen , Fabio Estevam , Mark Brown , Sasha Levin Subject: [PATCH 4.9 045/271] ASoC: imx-sgtl5000: put of nodes if finding codec fails Date: Tue, 28 Jan 2020 15:03:14 +0100 Message-Id: <20200128135856.001364289@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200128135852.449088278@linuxfoundation.org> References: <20200128135852.449088278@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stefan Agner [ Upstream commit d9866572486802bc598a3e8576a5231378d190de ] Make sure to properly put the of node in case finding the codec fails. Fixes: 81e8e4926167 ("ASoC: fsl: add sgtl5000 clock support for imx-sgtl5000") Signed-off-by: Stefan Agner Reviewed-by: Daniel Baluta Acked-by: Nicolin Chen Reviewed-by: Fabio Estevam Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/fsl/imx-sgtl5000.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/soc/fsl/imx-sgtl5000.c b/sound/soc/fsl/imx-sgtl5000.c index 8e525f7ac08d1..3d99a8579c99f 100644 --- a/sound/soc/fsl/imx-sgtl5000.c +++ b/sound/soc/fsl/imx-sgtl5000.c @@ -119,7 +119,8 @@ static int imx_sgtl5000_probe(struct platform_device *pdev) codec_dev = of_find_i2c_device_by_node(codec_np); if (!codec_dev) { dev_err(&pdev->dev, "failed to find codec platform device\n"); - return -EPROBE_DEFER; + ret = -EPROBE_DEFER; + goto fail; } data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL); -- 2.20.1