From patchwork Tue Sep 13 21:22:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikhail Rudenko X-Patchwork-Id: 12975397 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A7F77C54EE9 for ; Tue, 13 Sep 2022 21:24:02 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 8272A17A9; Tue, 13 Sep 2022 23:23:09 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8272A17A9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1663104239; bh=lKF1jCOzRtAkO9GC+HUc5mXA2fizB9VVIZs5GM8JdbM=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=X1YJT2azQaKN4ZvhaMD80DvQc7bpSZOLSaEutcdaGg86xtinW0SpEMpDowUeo34N4 dJvNMTxzK4OIZHT+AAWrUeAiBbULqszVNv/nS0ypPZHJ59LjQ5IzBpS5+vatJDy/el NzprH8laaIT+mj+/ZV2eDGqS07q4WbeU3p2e+Jsk= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 0EDD9F801EC; Tue, 13 Sep 2022 23:23:09 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E2543F80224; Tue, 13 Sep 2022 23:23:06 +0200 (CEST) Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 409AAF800FE for ; Tue, 13 Sep 2022 23:23:03 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 409AAF800FE Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Qik0HCAE" Received: by mail-lf1-x130.google.com with SMTP id a3so10123926lfk.9 for ; Tue, 13 Sep 2022 14:23:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=IcnIgmMTd0DbyquQgMbmNfx9FsBF4BI9rV5mzK+kC9s=; b=Qik0HCAE4mWGdPhhl3Z4XxHZp2Fsh0qBqor3gfQ7RHj1oA6dc1TrGetu03nykh1gIs w+ofH7Fq69SEMBdJ6Ch4oIylIIktjNbYHlz/yjxBxzoJ4pRA+e6nMmQ4GUXJUYgi7fdO ZUY3CacnUYhm1obecq1Z183lWv5T5Jw0YJnsIXaiSMe7zocNkqyvQzKrIM4M7d88m2HQ IfJM1vEV597EU42uX81zY0iOXdGc5+/VGJG/4bp5uVAFNB1s5HEJw0Q0DB/s4FOosgez t5RMwiGNUr3quyrVSVMEYmfX6VB1rt+KlxCbBwURFi/6i0gclZ8xRNSu6UiGPjteEK2U 6pPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=IcnIgmMTd0DbyquQgMbmNfx9FsBF4BI9rV5mzK+kC9s=; b=k+gjHGLaMrxUdxSbD55eilR/ZkxNLrY0lib92BiC0OZ+u+v4mKIS2+91eNhIoA1k2p ocgoGZJ2PzRotXjk6eHrv4Oe+3yvxpioeJhy9fBMf5dmabVOMJ2rGqlXIUsXFpuhs+ig hdQuDTFR+2nrp2UOZ7evRCiPcSQSv5zfnXevBzoXsqyaU89j/nHxaSwwJ2XMiAls8VXI 5yfcVlI7x4BSw2jQebw50cUlrhjYWaORjPO/GPPhF268aib9sLZP2jVGxzMBOGPShe+/ 4QnHFJAtmjC8L9d9ChCKsA9gNS3HLLIW41jen7UwEcrUfI9ee5oNwz6iyVj9YkXnz46O W+UQ== X-Gm-Message-State: ACgBeo3Ss7WtWv/SnOA9JEeXT989DOSAcZ6FKTxJ3v+jQ/uuvoDMTHhg VLrQYkXSfOXXXMtoJq68zTg= X-Google-Smtp-Source: AA6agR7lqpwxdnlrp1g555khCJ+9y1Mn78ZuFzcawcY9GJzf7Jw2t+odgShu0RDTZclAju9cgeR/kw== X-Received: by 2002:a19:e00d:0:b0:492:e5a5:588b with SMTP id x13-20020a19e00d000000b00492e5a5588bmr10452415lfg.243.1663104182075; Tue, 13 Sep 2022 14:23:02 -0700 (PDT) Received: from localhost (95-31-185-216.broadband.corbina.ru. [95.31.185.216]) by smtp.gmail.com with ESMTPSA id s28-20020a195e1c000000b004979da67114sm1964736lfb.255.2022.09.13.14.22.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Sep 2022 14:23:01 -0700 (PDT) From: Mikhail Rudenko To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Charles Keepax , Li Chen , Kuninori Morimoto Subject: [PATCH v2 1/2] ASoC: sunxi: sun4i-codec: silence misleading error in probe Date: Wed, 14 Sep 2022 00:22:54 +0300 Message-Id: <20220913212256.151799-1-mike.rudenko@gmail.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: References: MIME-Version: 1.0 Cc: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Mikhail Rudenko X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" In the case when a codec device is probed before codec analog controls, snd_soc_register_card() returns -EPROBE_DEFER, resulting in a misleading error message sun4i-codec 1c22c00.codec: Failed to register our card even if the device is probed successfully later. Use dev_err_probe() to demote the above error to a debug message. Acked-by: Jernej Skrabec Signed-off-by: Mikhail Rudenko --- changes in v2: - rebase against current tree - add Jernej's Acked-by sound/soc/sunxi/sun4i-codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.37.3 diff --git a/sound/soc/sunxi/sun4i-codec.c b/sound/soc/sunxi/sun4i-codec.c index 830beb38bf15..3a7075d03c23 100644 --- a/sound/soc/sunxi/sun4i-codec.c +++ b/sound/soc/sunxi/sun4i-codec.c @@ -1804,7 +1804,7 @@ static int sun4i_codec_probe(struct platform_device *pdev) ret = snd_soc_register_card(card); if (ret) { - dev_err(&pdev->dev, "Failed to register our card\n"); + dev_err_probe(&pdev->dev, ret, "Failed to register our card\n"); goto err_assert_reset; }