From nobody Sat Jul 25 18:05:54 2026 Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 14A3C338910 for ; Wed, 15 Jul 2026 05:11:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.176 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784092306; cv=none; b=mcJGs1R7hmEiBOoswYyeGwXmN2HUKN1u/59FPx1PmIVibVBgdBJrE158AE+TDFRjgnmPp+rTftXLBsufA+dJh4pfj0JlKspsFc1lt/+YbAxIbaCCciPndGgf1km8BuF/Mxp7UUEAJityFc1+pky03EkvqXV8VVytGmB6+P73rEA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784092306; c=relaxed/simple; bh=E4mIJW9wHkQ6Yon8lE8Da90aQYJtHYfqur+wNVf38QU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mzhnjmD3wZ8q3ZjNRjj3p0UNjkTQhuhoP8/oZnTgU+KHCisyPn7dT0XOIRAO8giliHuvGoNZ6uUUPVVU7YK0aFsga5gLOtIZ+hUnUoqj/tv+iI3ku1oQOCvxYoK7lWA8L+yZiw+Cs/V5EgkoO7YLEFh0fT9NUXBbFRGB4s0IkDY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Lf2YESXF; arc=none smtp.client-ip=209.85.210.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Lf2YESXF" Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-84830c774a0so1291659b3a.1 for ; Tue, 14 Jul 2026 22:11:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784092304; x=1784697104; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=ZlbqqQzyBbuATWOdD8i4hZIk03ddaqsUqXtC2EEDeJc=; b=Lf2YESXF7esQno3dU0FW+REqpYcao6S7YAL4Mj+R6Z5KdORTXqZobgsdKJxthqAS07 ECE3KuntPD0PwasiUn3To0IAtKQ66X0g3ITBeZjJGh7X3CGDlM6FjD+DWl3fjmXYIMr1 7/i1NuR2Q5ghBIAdtvhk3io6Tm/OD6Yfu0eQFwTvrhdDSeOUyzE1dKQirokrB+eKD9iZ sSeDZ0eA04OIs5LOkztVFmvOt9cSS2PUlkzZqca+CrsbtZJKNB9SrkoKzJXQ3i/jFe0O wDVlneNvci/yE+5z7NqZfwfwwSvopAE0s+RyautpoHu+gBFZ1qkvAmxR4zXvUa/BWSWd rxog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784092304; x=1784697104; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=ZlbqqQzyBbuATWOdD8i4hZIk03ddaqsUqXtC2EEDeJc=; b=AUS7DS5JhP4PvFFMfgoCzszKdkisIXqACeSie9gIEIyJDYXgHHZYMvMRyintNDGRAZ 8Qn0sNQgiBqg4nLKdZLXGKlypJzJb1xYxWrUIFypitgFygrOMjNA6M49BUZB8jUCiD/2 67TxdfQEO5fz8CCkXpnRgudJWxW3icuxGAw14Ftok+OSAO7kX3GYLFa1j99bfS05e3yH 58dOSEH6TK6icc+p8EmT/7TyL3V6FBjO4wEz0v0YxKqMCSeHNzUFQIrcEl9b23rs4wRi VlRuBA8fHVc14CcrsYAzmstlt+ZFTh/HoB6YvGJ6YSIxBHVmjAIGKNla3AumoJDdFoq+ zXmg== X-Forwarded-Encrypted: i=1; AHgh+RrJTKF2gFGpoWjrk4iWtrfqfZP3VPc2kK+QxSaRR3IYPxfgtU1bQ6j7xDLIBnA8MTCC3YYMVP36pL9By+c=@vger.kernel.org X-Gm-Message-State: AOJu0YzNIxbCCApSOCyRXerXRQ/Q34AFoJY5Pe7Dz9ay33aeEcruuh20 gPpL7HLiWleDafSmtMlOGJG+9UIWzx17DlqhrXgX9PDnEhYA9voyiuC289PL1w== X-Gm-Gg: AfdE7clNm2XamopJLHKYO9QWge/2GdAfY6xK0DI2P1DTaZFWDpcxmamWD8g8LyMNGeY 26q0yAJ7+46t1qPm9hLGOyEkNiAurHjeeUc2MekUWp54biMpBW+k17yyKZzzIVrx75Dmx4eudKV /D0YN7CbZ7W1Bjkz6qa6hOEEdYgl6Y78zRmpd9kWtjURM+rmK6iAM9P6sqOJQ4/PCfdgG0/abev ALB6USbNvoTIwOxdjb7wZW1WtA9rdD5qFm9DFHltJLLEhvRb5zf01Sa0xyZ2YEaTOQHxwPzzetT OllOsaoOl3CYM6oSRI7c517CquKG3EmJ0ExMJtLobIfShNUjYZSLlj44wTMMd7lOZar1NaCiVtV aw/rrg794zHAgvxbM7pvimsot8S2KgZjRhR92B69MY9Bry5ciq8saoeEKSQLENnfFXJQVCkIxBb zDDXAuj2jTuoJuTYbh0Wo2x+V1vLSug/On6Q7vtRTmUduBRIs= X-Received: by 2002:aa7:9066:0:b0:848:6537:580b with SMTP id d2e1a72fcca58-84889803483mr13965120b3a.51.1784092304373; Tue, 14 Jul 2026 22:11:44 -0700 (PDT) Received: from phuc-desktop.. ([183.91.15.56]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-84a4f271ddbsm2594093b3a.18.2026.07.14.22.11.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2026 22:11:43 -0700 (PDT) From: phucduc.bui@gmail.com To: Mark Brown , Thierry Reding , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Jonathan Hunter Cc: Krzysztof Kozlowski , Sheetal , u.kleine-koenig@baylibre.com, Kuninori Morimoto , Rosen Penev , Piyush Patle , Takashi Sakamoto , Bjorn Helgaas , linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, bui duc phuc Subject: [PATCH 1/4] ASoC: tegra: tegra20_das: Use dev_err_probe() for error handling Date: Wed, 15 Jul 2026 12:11:12 +0700 Message-ID: <20260715051115.17385-2-phucduc.bui@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260715051115.17385-1-phucduc.bui@gmail.com> References: <20260715051115.17385-1-phucduc.bui@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: bui duc phuc Replace the existing dev_err() and PTR_ERR() sequence with dev_err_probe(), preserving the original error code while simplifying the error handling. Signed-off-by: bui duc phuc Reviewed-by: Thierry Reding --- sound/soc/tegra/tegra20_das.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sound/soc/tegra/tegra20_das.c b/sound/soc/tegra/tegra20_das.c index b48cc4a6967b..ea8bc9bcfa67 100644 --- a/sound/soc/tegra/tegra20_das.c +++ b/sound/soc/tegra/tegra20_das.c @@ -167,10 +167,9 @@ static int tegra20_das_probe(struct platform_device *p= dev) =20 das->regmap =3D devm_regmap_init_mmio(&pdev->dev, regs, &tegra20_das_regmap_config); - if (IS_ERR(das->regmap)) { - dev_err(&pdev->dev, "regmap init failed\n"); - return PTR_ERR(das->regmap); - } + if (IS_ERR(das->regmap)) + return dev_err_probe(&pdev->dev, PTR_ERR(das->regmap), + "regmap init failed\n"); =20 tegra20_das_connect_dap_to_dac(das, TEGRA20_DAS_DAP_ID_1, TEGRA20_DAS_DAP_SEL_DAC1); --=20 2.43.0 From nobody Sat Jul 25 18:05:54 2026 Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 64EC33A9639 for ; Wed, 15 Jul 2026 05:11:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.175 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784092312; cv=none; b=ppsXwV9rr7xLt6YtlC1PAxlyLpV9VQrTYn1KGrpp1RatxCd5V32/Y/eYmj8FPUIVn35dw0gXybvnhHDmyOVhh0TVY4F3FYtIBGqrNbJi9bn5BnQUQ1CKAQOCmiKyujJOwoOSIbJctbLHdjx8+dg/wUFiY9j9cVXFLDqd5SxgYqg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784092312; c=relaxed/simple; bh=HKOtwDSzyfpc4r+p71+NekAihXrkWUS0xjBtkIxY3a8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BkDkeyGI/NqxY/Vy2dOVEbVH/OrFZ2prlmDX7np0F2GUXtCVWJqqc4Q1IDu5kH0tmfxk53w5scFum5Tv9ddzxA3XEol3hB4+GtrMEv4tSBRIc6VcV2lFSAZt7Nv3pqGLpGUpeNuvP/K6VYivpwHvEMdKAiAOBG93RJxfQu0FLGc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=X/qJ02+5; arc=none smtp.client-ip=209.85.210.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="X/qJ02+5" Received: by mail-pf1-f175.google.com with SMTP id d2e1a72fcca58-848743155bcso723905b3a.0 for ; Tue, 14 Jul 2026 22:11:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784092311; x=1784697111; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=CDk3AaOarzS5zPuAPo5vxdFtas51v1EJSd2mFAJXgc4=; b=X/qJ02+5iP9Swftp/W96SZTTJ49wpKdzAeWmUzy6y4nucKsC49D1FBMkU6atdEOcgq buubdqCXqzZydW4k2DNTmDtB7AfANYjRFD7463d+jxCZwMREp8oTqjIin9CcsmcUJR23 pGF9DbcA6Ax0yyL2NMWpUWwvZ7oN7MfZpfBvhEsNNkws6lPgSiwlhzoKjeIClsNjslSE xnsWJbs2khVPU1Oes51ApmnLLx48yEIAhAE4GGbZYDm1Up6M21uLoCRLiMNnrdoZ2/Vn ye4LsFmmop5a527KQZiK8DKznLERPEysg3AVQloPMLba2gn1ikeTETytCQYxs9abVIJE J2KQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784092311; x=1784697111; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=CDk3AaOarzS5zPuAPo5vxdFtas51v1EJSd2mFAJXgc4=; b=P+cffVs/QGAdkVaOo1bIIOBgNJb4STNfEtFIqEYpZ1mPBGd3n1paLr/qrOzvyKJVtw h/nF4X2uvzjzRyCyoF0Fm4Vf08IiEtqyOkjPgq1T0u1uEvp8OoHRspRQOB3ZwGcPn2y7 K2VVehSEAZFussJ52x43LgybVaagc3vaGdhFD3ADP/IYmoj2JMeHtdakYcPXSIjm+mPm 1OQn7tRIPhF9rmo0a1VwVxfDBKs/guku/j7AeRLteXQ95G+y9tLBWS1yJ+BiTeXGsUVr wsSSa/Nfgayt/+9RqzcqzIFqvy0OfoFnaAg/fA8NvofhPIoCsu4v3Y4nbd9Armsgzi5q 5F3Q== X-Forwarded-Encrypted: i=1; AHgh+Rq6yljcmI8VGDFTBER0kvnQce62v9rZSdQp2XTAxeZ5umc1QH/iIxBHngYRMhp7ErdHtwXdD8480K2LsZk=@vger.kernel.org X-Gm-Message-State: AOJu0YyRRv2nAzQ1MeVO3JfIBpix/EpwSFDKjCDoNOLZble5TYRBSx+w RuHfijlyqNHOQuMJ+A+0/hZTLZJHR75RN49PZbG2HZBXO34O+6QU5SfY7u0qGQ== X-Gm-Gg: AfdE7cl9Qb5Ut2cCVk2M7xOJJ2wbl/QZzNhY+eVAbC4UM8AFsKvnuieArTcLQ28yT1U WANlabcyxclgInptyUQQ+fyKYWODIHufmO9v3bGvopX9dnxZd2LSA3gl/2SsuKAZnLY9Zj8nJUd 9Ry42aF32KgAbNw+zBpneQDz8pWhBB3nzKp5IBXSICaom/qAp5Yj3pp+gVL5By/tIMHvu2oNYGS dpi0ggLl69qRLw+oMiRwkTKYE4llxZVVJD1ZKIt67thuDsBqvGBlVeO2T2atHYnV2dNW8dIj9/d eWLtN/Hp3M3vaETJZdBuuglqXLRs/XHJrxEQ/G1LIUYkyzL6QqLBSNJbJTiWWF2AwrdQe4koeJw HPIcF0iiYuWxX6JWfBT+o+Q6ZQ8IGeNm1EsIxpWtKtadrKRRCT2SlHNr5g0Bj3HTRHhAUXNBkd2 Kejr4oo9xE+7T8ywS5lf01JIqCbJKn6OHdw87G2aAvkP5xS/o= X-Received: by 2002:a05:6a00:4605:b0:848:6447:e0a6 with SMTP id d2e1a72fcca58-848895db193mr14552722b3a.9.1784092310681; Tue, 14 Jul 2026 22:11:50 -0700 (PDT) Received: from phuc-desktop.. ([183.91.15.56]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-84a4f271ddbsm2594093b3a.18.2026.07.14.22.11.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2026 22:11:50 -0700 (PDT) From: phucduc.bui@gmail.com To: Mark Brown , Thierry Reding , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Jonathan Hunter Cc: Krzysztof Kozlowski , Sheetal , u.kleine-koenig@baylibre.com, Kuninori Morimoto , Rosen Penev , Piyush Patle , Takashi Sakamoto , Bjorn Helgaas , linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, bui duc phuc Subject: [PATCH 2/4] ASoC: tegra: tegra210_adx: Return the original error directly Date: Wed, 15 Jul 2026 12:11:13 +0700 Message-ID: <20260715051115.17385-3-phucduc.bui@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260715051115.17385-1-phucduc.bui@gmail.com> References: <20260715051115.17385-1-phucduc.bui@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: bui duc phuc snd_soc_add_component_controls() already reports failures internally. Return its error code directly instead of logging the error again in the component probe callback. Also remove the now unnecessary local error variable. Signed-off-by: bui duc phuc Reviewed-by: Thierry Reding --- sound/soc/tegra/tegra210_adx.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/sound/soc/tegra/tegra210_adx.c b/sound/soc/tegra/tegra210_adx.c index 15a94196ee1a..e75bf50f8fb0 100644 --- a/sound/soc/tegra/tegra210_adx.c +++ b/sound/soc/tegra/tegra210_adx.c @@ -496,16 +496,12 @@ static struct snd_kcontrol_new tegra264_adx_controls[= ] =3D { static int tegra210_adx_component_probe(struct snd_soc_component *componen= t) { struct tegra210_adx *adx =3D snd_soc_component_get_drvdata(component); - int err =3D 0; =20 - if (adx->soc_data->num_controls) { - err =3D snd_soc_add_component_controls(component, adx->soc_data->control= s, - adx->soc_data->num_controls); - if (err) - dev_err(component->dev, "can't add ADX controls, err: %d\n", err); - } + if (adx->soc_data->num_controls) + return snd_soc_add_component_controls(component, adx->soc_data->controls, + adx->soc_data->num_controls); =20 - return err; + return 0; } =20 static const struct snd_soc_component_driver tegra210_adx_cmpnt =3D { --=20 2.43.0 From nobody Sat Jul 25 18:05:54 2026 Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9AC513A9639 for ; Wed, 15 Jul 2026 05:11:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784092318; cv=none; b=ki36H970w265dLmLAclm8+eY/cgSKMrxpxxzskQWhbqAsctd8o9lIBrUlX6TAGbsTmCNZxIDdUaiJHksXlz3y+/JAseNcuOMNMdkktd3DZFVtzAEY27WKpeZUMCtTlst70HfwMgCORhEsBfdPazXK6PUeNNEVuuXeqaiyVm8AsM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784092318; c=relaxed/simple; bh=qLfioYwLvE9VutCAAUZImR+gmjyd33EDpV+qIhvHhvQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MnNnMsugxkdymhXzb9ABLOykMJHNgW8Tv4lwILKLmztv7kAE6Z/GZxcC6nyLs6v1q776b+1hqEQvBMiEoA4rn3wh6k/f/oKEHuzsE3FN5b4sf1E5qoB8or092ag9WX8B10/RdVsjiOpFdIURVT3289663b084zmDI+maQJ+T0Ow= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=WMHdvV0C; arc=none smtp.client-ip=209.85.210.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WMHdvV0C" Received: by mail-pf1-f173.google.com with SMTP id d2e1a72fcca58-845c92bc464so1657547b3a.2 for ; Tue, 14 Jul 2026 22:11:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784092317; x=1784697117; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=6Up1ItAxd03r+T8RjvfRHCmeD/3+6lpPQg/1O4r65ak=; b=WMHdvV0CNHACGH8Yv2jKEFp14PVR6QtZNPN+XtL/gE9P4O6xwiip6IAzdqFzaryyGG 8/OR19Juj6W96A5HmIs/lOiAZy2k9adiJOtUEThUGxp+knjvLodcNIknq/eqV19lXAmw upvisJvhwTefFuAvrqa/BQ1Z98NicP+IWIMWOIw+GOmopYHHld1tQhF2EWIgtaAGrAu1 PI8co0Y7l9kFKX4tlSwoGJ/JJ6Fshk6pfUlwz4LjUjqnYmWIlCN6ZlqDwWw1dY9DPOJ0 WIdqIxaj7tDgo29Icct79phYxPpWN6fFx0iLVTxsjU2NLjN4emI7Te9W7qs3sBUZ4Sgq RZmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784092317; x=1784697117; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=6Up1ItAxd03r+T8RjvfRHCmeD/3+6lpPQg/1O4r65ak=; b=YMz3IvvAO3eUyPdPURJ0JZ89CyCstwMo79k0ZYhSG+FZULVS1LABzvU5galYbf5/Eg QjfRbaJO73bRUrcaMo/R93YPZaZ5dEGRlhhzFIcKXcez8Dql5e/4giCfbp/JsAPDqjLk bdRwuTzLhXlqMMoNTE6sHgB8aR41Uws3noLAZr2HV3AaYuilhjFbdmlxxUhjTkhZSUFA FYddlcBhnPLP/pFhsX3zZeZcaP5e0idiyd8ucym7TATSRy0dSDRMrmki1/t3CfKBAetk hN8G1kPo28gM2Wy1kqOwLnpTlLRrHJcfZrT2Qe4nL3euQhldp7//5M1UVEgGGOos0OOs 1wvg== X-Forwarded-Encrypted: i=1; AHgh+RoWYVYcQsCuuvSLLn/CeQ+PCyfPr71sGe24V8UCIpmc1PIJgoHqLwwk5dyiOYO4+DJurrEAYXCZA4aG+78=@vger.kernel.org X-Gm-Message-State: AOJu0YyrdD3v2XWP4zdQLiqy5aPDG4zu0JcfmG0QBxZTn3MvWwXt9wiw I24KvrWk0tPFPHejzQ8ukiZUg3WHu7zFWykdiA7K/BMlddgxfbxKZ82h X-Gm-Gg: AfdE7cllQTA+uWe+EavfGtA/3zrCSex9lVNbKu3KT2RL8sXfyTH7qk7pcKd5w2ysJhS qKQKyeeJ3LfWHSAY8A+pzevSURHY/01IY79Xhc3zU+8wj/nr8O7h11g1vKC1RnbE/72X6Gdwl/a lqcD9PgDo8T6dxu2ubjfJiM3N3xafG9x8lFbrlLRDnvMf81UQgmJuDPLMq12QAsUhkrFSJCQPVj aiZCc+0pqTZdCZbIpVnJCfxJsIG3wPacp0W0rRkSTAhJelrLDyT0QTe6A/nmphMhDca+2e4O6dr 0NlmVxXB9+AsTOdTpYH6h6aWcZWbISp1hvwTbD08cYecCgCB4mm+kzut73S06OM45T6D7/UyA/K CLR2zgeWLz3dCQVozs6tnu7St739oPMnvklW2TiBCwtG1EBCh84fBIHMUdqBRBk9fAfWmOzS2iv 3q+3+/xV4YLsx1mMYLpOkwUzK09ajbA0O/nky1x2AkXeQ/eSc= X-Received: by 2002:a05:6a00:b47:b0:847:9c99:ea52 with SMTP id d2e1a72fcca58-848896084ebmr15599104b3a.24.1784092317042; Tue, 14 Jul 2026 22:11:57 -0700 (PDT) Received: from phuc-desktop.. ([183.91.15.56]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-84a4f271ddbsm2594093b3a.18.2026.07.14.22.11.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2026 22:11:56 -0700 (PDT) From: phucduc.bui@gmail.com To: Mark Brown , Thierry Reding , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Jonathan Hunter Cc: Krzysztof Kozlowski , Sheetal , u.kleine-koenig@baylibre.com, Kuninori Morimoto , Rosen Penev , Piyush Patle , Takashi Sakamoto , Bjorn Helgaas , linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, bui duc phuc Subject: [PATCH 3/4] ASoC: tegra: tegra210_amx: Return the original error directly Date: Wed, 15 Jul 2026 12:11:14 +0700 Message-ID: <20260715051115.17385-4-phucduc.bui@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260715051115.17385-1-phucduc.bui@gmail.com> References: <20260715051115.17385-1-phucduc.bui@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: bui duc phuc snd_soc_add_component_controls() already reports failures internally. Return its error code directly instead of logging the error again in the component probe callback. Also remove the now unnecessary local error variable. Signed-off-by: bui duc phuc Reviewed-by: Thierry Reding --- sound/soc/tegra/tegra210_amx.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/sound/soc/tegra/tegra210_amx.c b/sound/soc/tegra/tegra210_amx.c index cc1f9c158191..6a67ce6128b4 100644 --- a/sound/soc/tegra/tegra210_amx.c +++ b/sound/soc/tegra/tegra210_amx.c @@ -504,16 +504,12 @@ static struct snd_kcontrol_new tegra264_amx_controls[= ] =3D { static int tegra210_amx_component_probe(struct snd_soc_component *componen= t) { struct tegra210_amx *amx =3D snd_soc_component_get_drvdata(component); - int err =3D 0; =20 - if (amx->soc_data->num_controls) { - err =3D snd_soc_add_component_controls(component, amx->soc_data->control= s, - amx->soc_data->num_controls); - if (err) - dev_err(component->dev, "can't add AMX controls, err: %d\n", err); - } + if (amx->soc_data->num_controls) + return snd_soc_add_component_controls(component, amx->soc_data->controls, + amx->soc_data->num_controls); =20 - return err; + return 0; } =20 static const struct snd_soc_component_driver tegra210_amx_cmpnt =3D { --=20 2.43.0 From nobody Sat Jul 25 18:05:54 2026 Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B26073B47D5 for ; Wed, 15 Jul 2026 05:12:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.175 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784092324; cv=none; b=BQOGYkr8Zp2edX0oGb9aNzcAVdgVVlcPo+32TQ/tglhti6cdq+pF4M1GCHfPfkKtlFZPyNBGhzjfrsdou7jspxs2wUTOTusQvcjUXbM98CcvS38cCgV8551pFw9+C9CwVKBcNUVu7zeo03SccckPc+wAQ8xUb159cBFIxSi9TRQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784092324; c=relaxed/simple; bh=JPBdZyzURlk1+bQObNjx1u7L1CoI0zKQeh16Th7K6Bk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Wvx3Miio9dwqFRBLxXruQvyivOAFLrdwt2Yqv8xnkiDdH+wyBjuF1O+En2xLocB+2S0x2k+D/JRWZCXVrPvNhnS9WX9iMs2rDyI6wnqnuMO2LkHYOkxpWOO2mNhiPHATGvJrSnMxHBkftfU3iSLzXgDVRiGBaEcDOeyUtOnwUeQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=dAIj8UDR; arc=none smtp.client-ip=209.85.210.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dAIj8UDR" Received: by mail-pf1-f175.google.com with SMTP id d2e1a72fcca58-84874b52eabso2327369b3a.0 for ; Tue, 14 Jul 2026 22:12:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784092323; x=1784697123; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=T3PRPoMPx+OET/WGMVQSkA8IuTp6F1i04Nbb1oO1IQs=; b=dAIj8UDRRMr8y+FQI+vFcwdOIx/WCErIDc+ydPmROxrCJoydr3vFLETtRh0WLriijJ 5C283A1JxcBEf5MaiyPbhgVLoIzr9GnzQfvI9z8gdB22IbUyATqiwtQ1wJksWD6oR0sn NNB7YvCtK5Wt/kmyjqfyEp8stg+YqSV4pxZcUOMmcnSQB/taGQNOIDcxn3JHvMFpCjhe E5/nSKQLpbuLWPUm7S2Y/1mVTXmtS5uprUQ4V7Uu+PpF0VnakgA0zswodhYgKgOxZrEZ US2MdrEpa7f0YbAPLw2fVh+ZvFSIOZ1TMhB/gim8W4Q8+gwWhqsQNs4n3EoXP12aklxx Z/EQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784092323; x=1784697123; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=T3PRPoMPx+OET/WGMVQSkA8IuTp6F1i04Nbb1oO1IQs=; b=CCmDDzGVLjYzsf3s0JJ6+yRT1oEtVLtdrRdF6mhxbicn/yA83j7rEN/2OmiWeIECDe JdfhtfOiV16hBcizqqnSVdr6Xi4BBgRhpUB97i/zjCgeOZ/KFOHIUuTFRKcxg+AWET1Y hNHj10oF1IKpiW6wRcMu9BJ4TSj3OM8Koa3ehvqcVJclpQh8zKxuydlEOD1AoHUuvmyM phyVuLFCgboYZksUTmW822RIRMskQweFibueYza0FHk9q8dyH9yHI4BfEfKCS8z+urMd KIKMyuNWlh+04XGusNU7MVPQ1SYRlGcWCzc/R/DVjlYXq/QpXYC2fQRx71sIkpCfroYj B1aw== X-Forwarded-Encrypted: i=1; AHgh+RpW8p1Ywwy+4lOcVsu6Bf9WBBTqGphtRs8u5Zbi7mV/GeT3BqZqdUJDTzbaKKeADh4221JrFR/71LDH+cg=@vger.kernel.org X-Gm-Message-State: AOJu0YzOGdIVMP5n+d+1Ru3mgWZSnJwHNg6jxp+chlqMPTAcbB1xU6bF LFPJzJK6NMt1OL6nd69vTjCZDlGADbVcUClZrdVS8Y9JeSYQwX16XELR X-Gm-Gg: AfdE7clrvwgbSA2opHvVG+9JxcLaE+ARR5ycuOyNMMOt1modpgtae6TwQ8kJL6PS031 lMf9y3+NEyAe461/i3B4egjWWlWuxqGMyn9JTAujHl6aP2fs82Ys3DDkIZB1xNC04PF241Rx4YP 76Gub1O/8wI7DE/MYhmL3dHv+UkA80xehBt2U9JxS2QXCHPHFD7lYFQtvwHxKTjxexbpyR3yolx G7zIZN4YelmSSjoLoS6GxTsjZDewNbUtiF2IeI6tX522PL8/LyYvtDbj4OihOnjgO+c2+Gv1/1l NmC78yXbaGsEhH1uz0knnlFtvMTidWjJgTmWb/Ay2sbARJACTDXTeMl36/KIr3jgusYbUAflOJO BRjNYAAXV9vz9eSCkibuFkIdfnd0e6Vw46WeWIsARS6pitw8Ey/nqExg6l7h5wLgfeYG5jLmpsq tArc0jdpd+zdPvRkUjlCSuiDhVRM1C0mhbLfZVreckS8VbEzKT+EXXVfLqTw== X-Received: by 2002:a05:6a00:179f:b0:848:60a2:4e9b with SMTP id d2e1a72fcca58-8488970ae6fmr14622666b3a.42.1784092323189; Tue, 14 Jul 2026 22:12:03 -0700 (PDT) Received: from phuc-desktop.. ([183.91.15.56]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-84a4f271ddbsm2594093b3a.18.2026.07.14.22.11.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2026 22:12:02 -0700 (PDT) From: phucduc.bui@gmail.com To: Mark Brown , Thierry Reding , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Jonathan Hunter Cc: Krzysztof Kozlowski , Sheetal , u.kleine-koenig@baylibre.com, Kuninori Morimoto , Rosen Penev , Piyush Patle , Takashi Sakamoto , Bjorn Helgaas , linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, bui duc phuc Subject: [PATCH 4/4] ASoC: tegra: tegra210: Use devm_clk_get_optional() for sync_input clock Date: Wed, 15 Jul 2026 12:11:15 +0700 Message-ID: <20260715051115.17385-5-phucduc.bui@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260715051115.17385-1-phucduc.bui@gmail.com> References: <20260715051115.17385-1-phucduc.bui@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: bui duc phuc The existing comment states that the sync_input clock is only needed when another I/O is configured to use the current I2S instance as its input clock, and the current code does not treat its absence as an error. Use devm_clk_get_optional() to match the existing behaviour while still reporting real failures via dev_err_probe(). Update the comment to describe the optional nature of the clock rather than the previous error handling. Signed-off-by: bui duc phuc Reviewed-by: Thierry Reding --- sound/soc/tegra/tegra210_i2s.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sound/soc/tegra/tegra210_i2s.c b/sound/soc/tegra/tegra210_i2s.c index ff8c72fc38c5..e7e26e917291 100644 --- a/sound/soc/tegra/tegra210_i2s.c +++ b/sound/soc/tegra/tegra210_i2s.c @@ -1078,13 +1078,13 @@ static int tegra210_i2s_probe(struct platform_devic= e *pdev) "can't retrieve I2S bit clock\n"); =20 /* - * Not an error, as this clock is needed only when some other I/O - * requires input clock from current I2S instance, which is - * configurable from DT. + * This clock is optional and is only needed when another I/O uses + * the current I2S instance as its input clock, as configured in DT. */ - i2s->clk_sync_input =3D devm_clk_get(dev, "sync_input"); + i2s->clk_sync_input =3D devm_clk_get_optional(dev, "sync_input"); if (IS_ERR(i2s->clk_sync_input)) - dev_dbg(dev, "can't retrieve I2S sync input clock\n"); + return dev_err_probe(dev, PTR_ERR(i2s->clk_sync_input), + "can't retrieve I2S sync input clock\n"); =20 regs =3D devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(regs)) --=20 2.43.0