Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3134779rdb; Sat, 9 Dec 2023 12:54:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IHZ76fyLpVB0ksM17T9m9Qk/aVhzfjREjIQM7BTzQnhSL46UteY4HhDa0cuC/mF2q50wona X-Received: by 2002:a05:6808:14d5:b0:3b9:dbc5:2fda with SMTP id f21-20020a05680814d500b003b9dbc52fdamr3017373oiw.49.1702155255735; Sat, 09 Dec 2023 12:54:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702155255; cv=none; d=google.com; s=arc-20160816; b=qVigh5IpEnvZ2XpiEJSolhS2zqqJgo7SISxqK08uXZttbjyx3iEGs7HnKuoZWgYCEl 0sNf53Va+KVDXGK74X2uPVJ6HMElpBAIxt14zm9n8WZ84pbYDJvcR9+7QKJxQB3j7Z/k k7J18h50v1kLd5LevHk/vOMEkj+ZwM1Gt6s5MssiAjs/i7WRA27trEAas8KHlQzgDqk2 r+Sy1Y57PFqGjGt20GnlK+cW9Kcuyh8qmGIB0Jrr7tV5orsN/FP9yAobfsqWT7FUvo7W vtJ+ytZmBIMFe/6i7+guALRfeLviIvCLvBgBRbaklaLGQPb61V3jvmeYPomChleBNJnz 2hVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=wUhHVpZoSI7z8zK6ZFhtvo3G6g+ubVGFVPOFX5/pE8k=; fh=qH4A7sjuqsI+9iJQtQMmOmQRysg9CNJ3X6TEjzAzPQM=; b=F8kegZ2+XUfe0HGqWh0ft7Ps4uZx5s4mlzkFRhb12WJKmKHPExsgeFwc4xvDodhtdM /LHf9BE8EGMR5LUgL19KNrqcREKy2HGMBGSohSlPLBAZ/E+ksOPppS8WmVDCd7p2ZUah b10jPS4qVXVzv7kQI4f2KU/TOAj+vOa8W0iyCyQugXTpZAbslpeYVVRPYtUHUltHkCiF jIV1xvhqQvVG2ZnaPAs01EEDX0d/mg1Vu24fP5fbjVbmDv2Z4fI4p8Tw54RWHZDNtbBT 8l0X3ziQD8480UgOT0zbQJj9uYi9MZfbmCQtYfwReTqOYvMIhmzERbL9/3XQb+rJ+udq +WJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="ez+KkUY/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id d15-20020a056a00198f00b006ce6ef58aa4si3562992pfl.344.2023.12.09.12.54.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Dec 2023 12:54:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="ez+KkUY/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 76806805F96E; Sat, 9 Dec 2023 12:54:14 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231254AbjLIUyE (ORCPT + 99 others); Sat, 9 Dec 2023 15:54:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231192AbjLIUyB (ORCPT ); Sat, 9 Dec 2023 15:54:01 -0500 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [IPv6:2a00:1098:ed:100::25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3ECCFE1; Sat, 9 Dec 2023 12:54:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1702155245; bh=Uzyzme1p3X66fqRyIz81KnujYtpDW+X/POMynZA7CsA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ez+KkUY/Mctyu+Il5OAscxfygxVAXr0MyAj8VUhaMowHF/cXZglw6BSp8PStaAbCk naQOFKrMDZ5urm2BOKiMbej+gsyGUucUEfg7E/+tz2/B75oJPLds4u6Q0UYCQ0VAHp 7BjI+Wch/+y1qjAgjmi/hU9UA5z+74AuuQQ5BLnVD05La5xEvYKLrFqUxEI9zzmIR8 ISQjCRVUDQ1FzaJOM9YzRWeXpVaVCGSg+u1sAieZHY+Tliq47eBmXYHTF89E4AESmk x5Wz8vZokHdUG+wAU4/CPb3Smb6OGWQS7T4USbQDyO2JNm+zkxDP+zp524Bz6U2Ihy dN/fpBpSGDFJg== Received: from localhost (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: cristicc) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 8DB3937813E0; Sat, 9 Dec 2023 20:54:05 +0000 (UTC) From: Cristian Ciocaltea To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Pierre-Louis Bossart , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Daniel Baluta , Kai Vehmanen , Venkata Prasad Potturu , Alper Nebi Yasak , Syed Saba Kareem , Kuninori Morimoto , Marian Postevca , Vijendar Mukunda , V sujith kumar Reddy , Mastan Katragadda , Ajit Kumar Pandey Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, sound-open-firmware@alsa-project.org, kernel@collabora.com Subject: [PATCH 03/11] ASoC: amd: acp: Add missing error handling in sof-mach Date: Sat, 9 Dec 2023 22:53:42 +0200 Message-ID: <20231209205351.880797-4-cristian.ciocaltea@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231209205351.880797-1-cristian.ciocaltea@collabora.com> References: <20231209205351.880797-1-cristian.ciocaltea@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sat, 09 Dec 2023 12:54:14 -0800 (PST) Handle potential acp_sofdsp_dai_links_create() errors in ACP SOF machine driver's probe function. Additionally, switch to dev_err_probe(). Fixes: 9f84940f5004 ("ASoC: amd: acp: Add SOF audio support on Chrome board") Signed-off-by: Cristian Ciocaltea --- sound/soc/amd/acp/acp-sof-mach.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/sound/soc/amd/acp/acp-sof-mach.c b/sound/soc/amd/acp/acp-sof-mach.c index 1d313fcb5f2d..6f0ca23638af 100644 --- a/sound/soc/amd/acp/acp-sof-mach.c +++ b/sound/soc/amd/acp/acp-sof-mach.c @@ -112,16 +112,14 @@ static int acp_sof_probe(struct platform_device *pdev) if (dmi_id && dmi_id->driver_data) acp_card_drvdata->tdm_mode = dmi_id->driver_data; - acp_sofdsp_dai_links_create(card); + ret = acp_sofdsp_dai_links_create(card); + if (ret) + return dev_err_probe(&pdev->dev, ret, "Failed to create DAI links\n"); ret = devm_snd_soc_register_card(&pdev->dev, card); - if (ret) { - dev_err(&pdev->dev, - "devm_snd_soc_register_card(%s) failed: %d\n", - card->name, ret); - return ret; - } - + if (ret) + return dev_err_probe(&pdev->dev, ret, + "Failed to register card(%s)\n", card->name); return 0; } -- 2.43.0