Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2904906imu; Fri, 18 Jan 2019 01:09:14 -0800 (PST) X-Google-Smtp-Source: ALg8bN6YU5/cpBymx24EWkN6byS/8Yq6EFKBcEIbyg91ymqLpXVbzHNWxSfZ8WaJSKoAoXA89Ys8 X-Received: by 2002:a62:8d4f:: with SMTP id z76mr19038523pfd.2.1547802554477; Fri, 18 Jan 2019 01:09:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547802554; cv=none; d=google.com; s=arc-20160816; b=j7gF6ypoyf1RXA0m05qV71J38VO0xahIi0Mk31RNOUpdx076SbmS+9Ewxqr/NBO3nZ 4NUFpZ0U2JinHmiHI+p2Y+ek3Bkb1cs+skZAxuf89/vWbasN1NE46SGMm9LFDFbQGbwn FSQ24zfXR7IqRWqZsFqER9nhOiPfDzAKu9iLnAgjtYafbO+VyBNaQdNmMWWa9kUR5tXx 0YHpaWyytTrdPh9ZVbGAUkY88sRWfNmVGVQSmG5643oxwzjHRqJGdGa1W3okG7Dt1C12 QN1sp5N7iCkYEC/w5yDZT9xzg14INaexwe9M//0SdkTslR2SuEKb62pKMxaK6D7NwuPX 17rg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=0PpLiqqUVfZQph2DJ9oOoslhEEBRpbp9uI2svkbvRnk=; b=aYyZ8beEOV+prLDuQJEzqKb2pUAhZaYRjUUtpU0k76qr0aMP0eMX94MC/hro7muia4 dKegkiUIg8UgnGyq4DzbO4FmvOZcrnrUgw0KDawg32eAAZOxQIpEFm8+IMMAHtnpnVnO tc/PWhYyyvbB00MB3HLvzVkvrMCnTJ+n0aNB4UskQY725HbXOHuJ9fJZb8gm88XXvGxF hMLZM5dckmCxz0XAuZ6GqRZW0dIodsWMp8SuQMJyWctOPCUF7SGd3UY3+7lcfZlp8pLN 0gBLAF3+MgCPEh0A9epGxWeEBV80DTO5arl6wdE2XUYFB+b5301lgi7S3wtUKZxsLHPM EQSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@agner.ch header.s=dkim header.b=GhXnQ8DY; 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 a28si4072677pgl.530.2019.01.18.01.08.58; Fri, 18 Jan 2019 01:09:14 -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=GhXnQ8DY; 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 S1726908AbfARJHB (ORCPT + 99 others); Fri, 18 Jan 2019 04:07:01 -0500 Received: from mail.kmu-office.ch ([178.209.48.109]:33820 "EHLO mail.kmu-office.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725856AbfARJHA (ORCPT ); Fri, 18 Jan 2019 04:07:00 -0500 Received: from trochilidae.toradex.int (unknown [46.140.72.82]) by mail.kmu-office.ch (Postfix) with ESMTPSA id 292315C00F2; Fri, 18 Jan 2019 10:06:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1547802419; 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: references; bh=0PpLiqqUVfZQph2DJ9oOoslhEEBRpbp9uI2svkbvRnk=; b=GhXnQ8DYg/ibcqeDs29l6uwGn1TtN7Clu0SbuxzGyQVT3AUupzCqjJwuLXIoF2rRM1LKs4 uFjm6Fn+ZZRj86rPdMPUpp/Low1Nwk3JssoKlJDW4b8xcEm/15mQZkfznzRrxU1Nr7xpPw 57CmCgQ92lVsa4F/3HqmGm0esbeTK3o= 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 , Daniel Baluta Subject: [PATCH v2 1/5] ASoC: imx-sgtl5000: put of nodes if finding codec fails Date: Fri, 18 Jan 2019 10:06:52 +0100 Message-Id: <20190118090656.14201-1-stefan@agner.ch> X-Mailer: git-send-email 2.20.1 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 Reviewed-by: Daniel Baluta Acked-by: Nicolin Chen --- Changes in v2: - Reordered patches, make sure this is the first in the patchset -- Stefan 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 c29200cf755a..594bde3b0ded 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