Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7688089rdb; Thu, 4 Jan 2024 04:52:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IH298F6NUfbRy/FbdmelFLdJLZPfuW0VzmLTsRCDTYWaEq5Qg0Zd46ZjXcPEs+u6sF60sH4 X-Received: by 2002:a05:6e02:1ba1:b0:35f:c550:d6aa with SMTP id n1-20020a056e021ba100b0035fc550d6aamr463891ili.17.1704372732036; Thu, 04 Jan 2024 04:52:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704372732; cv=none; d=google.com; s=arc-20160816; b=T75c+xF0VSs8FOOGENve/rYc6pfmHK+ovrprmIQMgh44KyUBqkJaSrLcVWi9Dt9tnd i4GLordH8YIJvjeC28/oncfA2qagDv5h3eMume0mwsr51BWYkEVphNKC9DyhB3wvAqb6 PCsqzUfPZkZ4JlkAzV0XJk1kA47YXiriFAxb6ri5g69ErRyCuS/tPsO1jwyWA0SnEHuW J86eMX2WROLDjEqIROw1qKgK59TJxfxJ5Bk61vcmQ0yhacBOo1ddlulLWOe4j3BmlET3 1wfc4UEqyr3het2LZvkZQq570uDpxIr/yl9TwqiTP68OPi3F0c66UvvmifAzEVnObD6E 9afw== ARC-Message-Signature: i=1; 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; bh=eXjcQzobubevG4rm1AbTK70bglA3mlT9ec6Qzkk+Q1k=; fh=zL5V5Qa/Cm+cYsSx/i/aRqSBIZSDNxCrc/UdPyDFK4Y=; b=vdwvmTo2h1eV/G1Srz3y9FR+ToOn+Ye7tenbMBkkmY4I/fLwb9RBiVlaNSJDNz1ZUG gcS2EUK/cZxf4JSlU7gK1mtIcpQhRYZQGZ5GnYPyTpbH6YYivWhcF6UL4G7/NC7NhwrQ t09jcUE+xc3AMsLSvIVIIw1fo/v/5PP+K2+YeD6gECK7XbNIaYT/xXrPMFV4t6EvmWk2 di28nOwMS4vQUXSUQ0HkAab2yoRyFAfpzu9SqsKq6v6TYFKYlpHipzvN0vPQS1x2J0u9 ujhFVM3rtkXY2Qz0anoslqS4eKro71RYcIdZxEQHr1QAPlcndxkLPif/lDxtQ6tNRNHR EZ6A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-16661-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16661-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id z6-20020a656646000000b005cec91974afsi1051333pgv.749.2024.01.04.04.52.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 04:52:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-16661-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-16661-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16661-linux.lists.archive=gmail.com@vger.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 9922BB2328D for ; Thu, 4 Jan 2024 12:52:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E3CF121A1C; Thu, 4 Jan 2024 12:52:00 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from smtp-190b.mail.infomaniak.ch (smtp-190b.mail.infomaniak.ch [185.125.25.11]) (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 3FE262137F for ; Thu, 4 Jan 2024 12:51:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=0leil.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=0leil.net Received: from smtp-2-0001.mail.infomaniak.ch (unknown [10.5.36.108]) by smtp-2-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4T5R7G64hBzMpnWg; Thu, 4 Jan 2024 12:42:18 +0000 (UTC) Received: from unknown by smtp-2-0001.mail.infomaniak.ch (Postfix) with ESMTPA id 4T5R7F6yDnzMpnPs; Thu, 4 Jan 2024 13:42:17 +0100 (CET) From: Quentin Schulz To: Neil Armstrong , Jessica Zhang , Sam Ravnborg , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter Cc: Quentin Schulz , Heiko Stuebner , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Quentin Schulz Subject: [PATCH 1/2] drm/panel: ltk050h3146w: only print message when GPIO getting is not EPROBE_DEFER Date: Thu, 4 Jan 2024 13:41:57 +0100 Message-ID: <20240104-ltk-dev_err_probe-v1-1-8ef3c0b585d8@theobroma-systems.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240104-ltk-dev_err_probe-v1-0-8ef3c0b585d8@theobroma-systems.com> References: <20240104-ltk-dev_err_probe-v1-0-8ef3c0b585d8@theobroma-systems.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" X-Mailer: b4 0.12.4 Content-Transfer-Encoding: 8bit X-Infomaniak-Routing: alpha From: Quentin Schulz devm_gpiod_get_optional may return EPROBE_DEFER in case the GPIO controller isn't yet probed when the panel driver is being probed. In that case, a spurious and confusing error message about not being able to get the reset GPIO is printed even though later on the device actually manages to get probed. Use dev_err_probe instead so that the message is only printed when it truly matters. Cc: Quentin Schulz Signed-off-by: Quentin Schulz --- drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c b/drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c index 30919c872ac8d..ecfa4181c4fd9 100644 --- a/drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c +++ b/drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c @@ -646,10 +646,8 @@ static int ltk050h3146w_probe(struct mipi_dsi_device *dsi) return -EINVAL; ctx->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW); - if (IS_ERR(ctx->reset_gpio)) { - dev_err(dev, "cannot get reset gpio\n"); - return PTR_ERR(ctx->reset_gpio); - } + if (IS_ERR(ctx->reset_gpio)) + return dev_err_probe(dev, PTR_ERR(ctx->reset_gpio), "cannot get reset gpio\n"); ctx->vci = devm_regulator_get(dev, "vci"); if (IS_ERR(ctx->vci)) { -- 2.43.0