Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1812223imu; Thu, 17 Jan 2019 03:44:28 -0800 (PST) X-Google-Smtp-Source: ALg8bN5QSiApFzGEMHzaT7JDZIY3VVrXaobPngT6M+bofj0x7LBD8NwEhIOQZxlyZSQ3QLLwqCcu X-Received: by 2002:a63:6506:: with SMTP id z6mr13200862pgb.334.1547725468578; Thu, 17 Jan 2019 03:44:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547725468; cv=none; d=google.com; s=arc-20160816; b=E6fRQgrogsz63mxpAOpKm0VKomFBcOJ37MyKsdFn8NupQ7pyhwDe4QP1r6PInBmemh Qidck1pHpZRO8As9NEl8aLL4w3l9GsoKVMRAasB8RG3s4MNZxt+Utue/j/1EjmyFAsNM xtHba2/4ONtodZNAb6XUJOeX3locMkk14rvSmj7RBwGXwMET7ad0Cq359prPScqgtzI4 5kPluTFDKITLD1IYnOAa8eOdxa7BULLjqU1Yg5ekzQTKIu1G0J0M6mmuw1ST3fLiM1XQ I3UdKW9xfFYAaszg/KVrEIIfb3kLigZq1d2fBgldTmSZ1e2mheo2cAuaFdI9SAXBQ0Z1 9d8g== 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=fBPaG8x3udk+G/2xYvR2q6rlGVrnyup1hxsA4F87nZo=; b=HqJSzN2Jy8kCjRu37yNkdyydqR8aXRDfrSJePDXffnPotjVsVt3BMm4dj/BPM+vQeR 6uAhgxZxq+LIuKjkSe5fPjr//f5UIgwObEqzW9o4tpi+SyfuApV6lE0BQ7ninfUTorpA mCZJgY5c8GKW8FqJC1LcsiONLpfxlAIXocyQWkbZ8bjgFRkTeZhBFHqaBIOnCnuycpGr bwJG8TDt2Q6m+tjF3ew3PaaV7WgaEHYBXjtphNXGuIv3ANRlJfx/Cmnpp4iHugPm8UrW LdFkiJ7xQgS5n/Kk1Mp7rbYM257bB4oOXo+1Lpgjb5J0xeOQq1GYBTfYCyEFOR/U7FUb yomA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@agner.ch header.s=dkim header.b=SwtMegUr; 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 n3si1486980plk.328.2019.01.17.03.44.13; Thu, 17 Jan 2019 03:44:28 -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=@agner.ch header.s=dkim header.b=SwtMegUr; 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 S1728197AbfAQJHH (ORCPT + 99 others); Thu, 17 Jan 2019 04:07:07 -0500 Received: from mail.kmu-office.ch ([178.209.48.109]:48938 "EHLO mail.kmu-office.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727517AbfAQJGy (ORCPT ); Thu, 17 Jan 2019 04:06:54 -0500 Received: from trochilidae.toradex.int (unknown [46.140.72.82]) by mail.kmu-office.ch (Postfix) with ESMTPSA id 9256B5C1E78; Thu, 17 Jan 2019 10:06:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1547716012; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fBPaG8x3udk+G/2xYvR2q6rlGVrnyup1hxsA4F87nZo=; b=SwtMegUrfjenwLy2K+vnuukw+ss3EmoBPhtECCVzp4WrQO58KISzGubjTDVdaU007SQyUY TVXNR+el0MHHdf7nirnjqphJ2SPmq2nchDzIDciTJHnH0lEiRImh0SqZ0vGixtD+B3ZRXe vQ9KE8XFyRYacWjOobMspZi9arVFQ6M= From: Stefan Agner To: timur@kernel.org, nicoleotsuka@gmail.com, Xiubo.Lee@gmail.com Cc: fabio.estevam@nxp.com, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Stefan Agner Subject: [PATCH 4/5] ASoC: imx-sgtl5000: put of nodes if finding codec fails Date: Thu, 17 Jan 2019 10:06:39 +0100 Message-Id: <20190117090640.12972-4-stefan@agner.ch> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190117090640.12972-1-stefan@agner.ch> References: <20190117090640.12972-1-stefan@agner.ch> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 e1e20499b2f1..45969e6dfad7 100644 --- a/sound/soc/fsl/imx-sgtl5000.c +++ b/sound/soc/fsl/imx-sgtl5000.c @@ -111,7 +111,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