From patchwork Sat May 25 13:28:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artur Weber X-Patchwork-Id: 13674020 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 82B0EC25B7D for ; Sat, 25 May 2024 13:28:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=KjtjEI/RTwlAuyI8mrsTZJQ39Ni+40WrFydcDPtAfHw=; b=4/uljOCPOfFUxj D/gGvRf14lafptg76yG/m5t5TFwSKPAuL90X6lmiJHakKuWuIRmyjEMJWQpcVMmEATQ5XMvthOfjT xc6QaFNF2gZZ9JMHMxUWhOZtfqBLAEJ5UIDDZ6tnOY08NhFpqeKniMbtuq0GH2KWE48Lmm6CEVLGw SfpbX5n9vUFwgXmBUWxSBbSZWIr5ftJN2ChSqBNYvdh02o58114kqz0kyUqCjK1ftRq9UX+UKiqJk J2dzpAHNKKcNqGfeXL6Z89g4nsPQnG7Dl6+yNojosPGdh1w2vERtK7B6q9LE2K8ZoDBoT75/P1aJw z7FaoLPPLg5J7IBo60wg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sArRl-0000000B4Ea-3Fgh; Sat, 25 May 2024 13:28:29 +0000 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sArRY-0000000B48K-2FzY for linux-arm-kernel@lists.infradead.org; Sat, 25 May 2024 13:28:18 +0000 Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-5755fafa5a7so9240558a12.1 for ; Sat, 25 May 2024 06:28:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716643695; x=1717248495; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=aYm1aEjf0Zap75LycmMoJDPmBXZE+yZRaT5MJKObyzU=; b=T2kqHxC9ezURjnmiZYi/yw81oqXXQdD46ewNrUcgTXv9OEHwz+FgF20oRmA6ikYMtO y61kE8t+UKw0/jKjbC8rlsGHcdl1FVGDJqkkbXP1LgGNj4afendDYIpNsCSBCNOT1rwT u3MfssyJzqFTOf3kNOmfUd+DbpvlddUJ3x5mpfUhz3IT5cvedIktwzugY7yNitcWk1Rt fa1pbt3ZutdsblqKy/ne9TnOron84b83wwUl+puFWf+MLDJPWzxYARRLH7KKbz/PjUIO IImItgi/DXYEzPjQec2qeEQdH2TY5A4qGDowH3Ej+9zOGTheIOafZx2qlfKV/J0a4ToJ L67Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716643695; x=1717248495; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aYm1aEjf0Zap75LycmMoJDPmBXZE+yZRaT5MJKObyzU=; b=cBbs5HIvMMW+/RQJcYdduSlny8Xj3hsA6i4csW/XKnv/tGgY1lg0IHmOySTDyTiiDJ WWWJuWmRlBFbG9tBViauYKj7yisGeyct4+eDx+6dZHAU913yPZiDyNsXplDUjcJloHtD RI+mvsKC7P+pYCol3hJad6gcuQh7wZJHm7I1bGMchJGWfMsA4hwl8ieathj1P4QrLJO1 aOkQ3bNBM07K+qRLKLZDv71Mmb5hvVyJVSNKMfveSJbuMjMDCMeXJlfUlTR91VK2NRd9 RjmvKYJ9jP2kfDINSO5FsB58e0hhoLjgBnnrWHdCTU27IaoHh04UjFwWQqEi8JLB9805 pInA== X-Forwarded-Encrypted: i=1; AJvYcCVORG7+DTMqS85jCOoYTagMX0CZXDjl0GAO0seZPLUwTzwZZ1GQSS0GTCLNURPCEVlDx2MCouinEi9jsJxTJQyoGvgctwmCQVDeVD4oGHiUxySBj1o= X-Gm-Message-State: AOJu0YzSpKh931NmfIu3i9xQcGZNOInT8gOo0n62zSYI0C3q0EYxM42o NyFL9qCtG/pi3Td+3NCainXdLHjXNVf7rnFwD02/gwmCZ7SrD0EW748Gaw== X-Google-Smtp-Source: AGHT+IHdx/tw9IhnGg8vGuaesdmmsPdkFnOGx7QFZnPi31e5dF3k4vigUZYqt0/oZwQjTd+tJOtmbQ== X-Received: by 2002:a17:906:1117:b0:a55:a895:46ae with SMTP id a640c23a62f3a-a6265259847mr314823766b.63.1716643694468; Sat, 25 May 2024 06:28:14 -0700 (PDT) Received: from hex.my.domain (83.8.128.191.ipv4.supernova.orange.pl. [83.8.128.191]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a626cda46e1sm251842566b.196.2024.05.25.06.28.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 May 2024 06:28:14 -0700 (PDT) From: Artur Weber Date: Sat, 25 May 2024 15:28:10 +0200 Subject: [PATCH v4 6/9] ASoC: samsung: midas_wm1811: Use dev_err_probe where appropriate MIME-Version: 1.0 Message-Id: <20240525-midas-wm1811-gpio-jack-v4-6-f488e03bd8c7@gmail.com> References: <20240525-midas-wm1811-gpio-jack-v4-0-f488e03bd8c7@gmail.com> In-Reply-To: <20240525-midas-wm1811-gpio-jack-v4-0-f488e03bd8c7@gmail.com> To: Sylwester Nawrocki , Krzysztof Kozlowski Cc: Liam Girdwood , Mark Brown , Rob Herring , Conor Dooley , Jaroslav Kysela , Takashi Iwai , Alim Akhtar , alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Artur Weber X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1716643685; l=1631; i=aweber.kernel@gmail.com; s=20231030; h=from:subject:message-id; bh=7q1elFo7CAxZkZBweHbgmjBT8X4yHLYsePVZJR8HO/Y=; b=awYAMRq5ulLIglF1H1Y0PzqOS1+tuiQldsorqr7g2v3Tj2K+KBY61oddW8/uQHpyx94/xqJYL nI8BlGptFftDtpMEsYUXRbgdBe19G8yVyT0v6GPBo4T6+cC5eZMmRmk X-Developer-Key: i=aweber.kernel@gmail.com; a=ed25519; pk=RhDBfWbJEHqDibXbhNEBAnc9FMkyznGxX/hwfhL8bv8= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240525_062816_694623_33571DA4 X-CRM114-Status: GOOD ( 13.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Since we're already using it in the newly-added GPIO requests for jack detection, extend it to the previous checks as well. Signed-off-by: Artur Weber --- Changes in v4: - Adapted to regulator get functions being dropped in favor of SND_SOC_DAPM_REGULATOR_SUPPLY Changes in v2: - Added this commit --- sound/soc/samsung/midas_wm1811.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/sound/soc/samsung/midas_wm1811.c b/sound/soc/samsung/midas_wm1811.c index 88fa9e5bc093..ad0283364081 100644 --- a/sound/soc/samsung/midas_wm1811.c +++ b/sound/soc/samsung/midas_wm1811.c @@ -590,17 +590,15 @@ static int midas_probe(struct platform_device *pdev) card->dev = dev; priv->gpio_fm_sel = devm_gpiod_get_optional(dev, "fm-sel", GPIOD_OUT_HIGH); - if (IS_ERR(priv->gpio_fm_sel)) { - dev_err(dev, "Failed to get FM selection GPIO\n"); - return PTR_ERR(priv->gpio_fm_sel); - } + if (IS_ERR(priv->gpio_fm_sel)) + return dev_err_probe(dev, PTR_ERR(priv->gpio_fm_sel), + "Failed to get FM selection GPIO\n"); priv->gpio_lineout_sel = devm_gpiod_get_optional(dev, "lineout-sel", GPIOD_OUT_HIGH); - if (IS_ERR(priv->gpio_lineout_sel)) { - dev_err(dev, "Failed to get line out selection GPIO\n"); - return PTR_ERR(priv->gpio_lineout_sel); - } + if (IS_ERR(priv->gpio_lineout_sel)) + return dev_err_probe(dev, PTR_ERR(priv->gpio_lineout_sel), + "Failed to get line out selection GPIO\n"); priv->gpio_headset_detect = devm_gpiod_get_optional(dev, "headset-detect", GPIOD_IN);