Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2381495lqp; Sun, 24 Mar 2024 16:55:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUtMVPkHTDvkXHj0xnWktNhmRdDyGkeuVHCead9aC7087X2gLhbJo/XrfGzkP7LlvIKjyQqKo2I0gZmnsBjTJpU4JE8+4sgx5rVqjGj+g== X-Google-Smtp-Source: AGHT+IG7HbW6fkJwaPhuQOtzWGjWsmLQu7NIKO284tGJcocmQO7edDSv49dWWTTrgHF2K+eNvuIL X-Received: by 2002:a05:622a:2985:b0:431:3df8:30b0 with SMTP id hd5-20020a05622a298500b004313df830b0mr6446169qtb.42.1711324531119; Sun, 24 Mar 2024 16:55:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711324531; cv=pass; d=google.com; s=arc-20160816; b=QLBfF8QSo3jgjfIh+0dHqaUpYcTZNaxuXTY/fhR8yqTfcBr7M6vTabuArO0PhXvjCg 3ZGUWeGj7yNMRGoiF1dLmIW6GBDM32vxl5ii06iTmnhyueA0r/gNo3tNfzHkWxgOaFWn sArsGUselruczdv714mKosNQK2gE2w76IYHA6PCIhE7JbynJsXSaSRPG38OmGAWofBi/ ++0IuB3Qj/cuEFXF63pXQJ4MyIOjGYc18KXH0wOsFbiDcjq5UTbY5F5lsJ9bEe8Qq/eX oaETqlNXt+bMSFYSG7CxwFGmyCXyAHkiMVXfnsG90/TyQyH3uK9tqKs/sQxC4NUOCB7c SQXQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=h33mGKAz+bDz2VcZ+O4FZTbC/qG1Xt3F9l30IXD3Y4k=; fh=xyO+CIbliXzkv7pjU3CTq5wABV/8CvRtuix89WvW5bY=; b=pVvRn5XAnuXJPh3tGgIM7qAl6ev9zmsg3SH5Nds3jnrVwK8RMRBApwJB2PxXYsIdTF 5kl3MQmF+wdmNRPw9cLpwWHLQ3DNlZ7rd7rqygoEAiSVM8h6StKIZ48vQgrDeSPo1D9T qHbk8lhE7Cn+o4PB3rH5Zm6hM8nS2YhnRoMpN1JBlMN+GyLNk3fMRkVFt0B31FbeOp2O XBJSYK5fadqQx/WyuhjN8RpMRyUc7hLURybaYyqhdC9YZjgz03ue3flhizY+n9jzCutR zi1gMYav9awcR/ZePzxQ5cDWQjEgBHXJ4X6sFTpue+CVuD990yswp8cANpbPpa6q7mIl UXKQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WTb8QbJ3; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113257-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113257-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d17-20020a05622a101100b00431579833dasi981334qte.605.2024.03.24.16.55.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 16:55:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113257-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WTb8QbJ3; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113257-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113257-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id D3C3B1C22DEA for ; Sun, 24 Mar 2024 23:55:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DD28B13CA8E; Sun, 24 Mar 2024 22:40:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="WTb8QbJ3" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D72F3187E90; Sun, 24 Mar 2024 22:40:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320056; cv=none; b=jnu2luSg0Bn8UhdrbhWAJBDQBUJnEnVMCZHeQJH07i3SbOLKKB7IeYRGAHr0iPjpHnXiV7vCe9fE0Gx40JjZiB91hxUAqDYniuhK54NdTYlL4ShqDWs3P7wO2+IiVfisVNvhRnLqT/HPfLn00oXCKfTFIct80qkOdDhE2MrYXW0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320056; c=relaxed/simple; bh=+rMlh2QubRCArm0kM1Dj0Fl4nnNuuvzgyDokws4LcJY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=I2KOScESkXiz0kEDWRFdvZxsxzoMgBZ6EXClZmnaqjD+3CF4HoHF7yePENKKdkK05CHt6+ycTCXIPn6TFF+56MGjV69C6eMpMTmGe2OG/9lXpms5MY3rbRNO7ugRvjukFDXwfVBjlq94c4/aoSjxLgmTIR23ip8eLIgPpLGoPcE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=WTb8QbJ3; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0EF4BC433A6; Sun, 24 Mar 2024 22:40:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711320056; bh=+rMlh2QubRCArm0kM1Dj0Fl4nnNuuvzgyDokws4LcJY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WTb8QbJ3PCMdPSCOXww8imJ4NoYlbD7md0hQMdq3jcWUgarwIMGjDYO7twkl9b7/Q yskPhXKQ1SgU04JiL/FV3fOuf0Q4x2Gq6q/+o0mKOEAHgOZnlUhmqX7FLSSgrN3c9e xmy8mSNFZT9NV6GauZkQlk3zWj2hnpaJ7K7BRe5kJVWu18MV1qy0MT8DiN7a//nz9t eCn5yjkAW6EP1tWFLdGSmZLcT/fu59wHIFXJecwSiuJD74x7X3MdnN6Zpx81/qfnXS P+QxnHXomMhUfvFEkYNb8yJJFOQyzpV86K8bpyZ+wV8WUr4PQRjPJ8SoPb0ZAkE5eL sAwFlCIzhKv1g== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Cristian Ciocaltea , Emil Velikov , Mark Brown , Sasha Levin Subject: [PATCH 6.8 366/715] ASoC: amd: acp: Add missing error handling in sof-mach Date: Sun, 24 Mar 2024 18:29:05 -0400 Message-ID: <20240324223455.1342824-367-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324223455.1342824-1-sashal@kernel.org> References: <20240324223455.1342824-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Cristian Ciocaltea [ Upstream commit d0ada20279db2649a7549a2b8a4a3379c59f238d ] Handle potential acp_sofdsp_dai_links_create() errors in ACP SOF machine driver's probe function. Note there is no need for an undo. While at it, switch to dev_err_probe(). Fixes: 9f84940f5004 ("ASoC: amd: acp: Add SOF audio support on Chrome board") Signed-off-by: Cristian Ciocaltea Reviewed-by: Emil Velikov Link: https://msgid.link/r/20231219030728.2431640-4-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- 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 20b94814a0462..b86f65d420054 100644 --- a/sound/soc/amd/acp/acp-sof-mach.c +++ b/sound/soc/amd/acp/acp-sof-mach.c @@ -126,16 +126,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