Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7688133rdb; Thu, 4 Jan 2024 04:52:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IHmXlnJIGd17zBFn7G/INx0xIzBg9eG000gSi3vg7CXxAih2kgPapgaQQXNKnCtapdt1YqF X-Received: by 2002:a05:6512:3f02:b0:50e:76e0:a51f with SMTP id y2-20020a0565123f0200b0050e76e0a51fmr411407lfa.100.1704372738944; Thu, 04 Jan 2024 04:52:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704372738; cv=none; d=google.com; s=arc-20160816; b=efnchyZK2mQheqgVAhzLf4AXui62P821CLzz8/4B8RgtxURPi+VGJmNYakIKr4wNPv dZqPjYzbnV/+9p7hVkOm3Adkpy0osDhifbfsWwSuanIzBfFWGtbRIMF6zIWQXZbaXoAF 7V36ip1hrn7gSc9PoBaMnG20lvh+wOrIReFR4/wwi27b3rkXVk491JbiCrtumj13a0/p RcbosrVzqIPyG2pGi9eJqDvdlEFGJusty61RIdb/yCRT2qZ/BLVAy0j3quaINy6sGAW0 u36AaNCVOhxRJw6OIUMlZUVkR9vec6pLAgzm91BhcUwBZKh+r+Gto1etJUjtSmRIq8+d iB8Q== 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=+zm58viRgXdYzDvE42vAcCH2HVPry4934VeqKly0N/U=; fh=zL5V5Qa/Cm+cYsSx/i/aRqSBIZSDNxCrc/UdPyDFK4Y=; b=p6rRBPBG3PdOq6MuUbd2g+E7uNk45lw/J1UGI+a9jOyGvvYVKPFf+zqCPP95gnp1PR KviLZ8k7MYY3S6VI25LMTn2nz9JO0TlXv0gVLEo/T0zuSuhHT+f8+Mp+E25y6ULoyc9X LXgyhNMJPA0alVjmA+qx3Slg+ApFbDZhxQliVMnqhBjBET2rUEczRB+u4Fs1MgUrSjts Yr0iYfJ1ushcl1CsH7Ki8njHBBHRXy2Rb7fgzWa0fMBmNC8qKZVBHcvqMtvWCOxZwOod M2CK90nd+i8acmE7+L1m1rXZ0IcJvUENhQdo6I/IO938rRUrVOFlKXOlvYXo0ctpSxmk gv0w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-16662-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16662-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id h23-20020a0564020e9700b00554f8c5b037si8801196eda.13.2024.01.04.04.52.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 04:52:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-16662-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-16662-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16662-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 am.mirrors.kernel.org (Postfix) with ESMTPS id A989C1F2276A for ; Thu, 4 Jan 2024 12:52:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BC52B2231E; Thu, 4 Jan 2024 12:52:01 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from smtp-8fab.mail.infomaniak.ch (smtp-8fab.mail.infomaniak.ch [83.166.143.171]) (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 60E482137E for ; Thu, 4 Jan 2024 12:51:58 +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 4T5R7H5ZSHzMpnqr; Thu, 4 Jan 2024 12:42:19 +0000 (UTC) Received: from unknown by smtp-2-0001.mail.infomaniak.ch (Postfix) with ESMTPA id 4T5R7G6TLWzMpnPs; Thu, 4 Jan 2024 13:42:18 +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 2/2] drm/panel: ltk050h3146w: use dev_err_probe wherever possible Date: Thu, 4 Jan 2024 13:41:58 +0100 Message-ID: <20240104-ltk-dev_err_probe-v1-2-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: quoted-printable X-Infomaniak-Routing: alpha From: Quentin Schulz =0D =0D This is only a cosmetic change.=0D =0D This replaces a hand-crafted EPROBE_DEFER handling for deciding to print=0D an error message with dev_err_probe.=0D =0D A side-effect is that dev_err_probe also adds a debug message when it's=0D not EPROBE_DEFER, but this is seen as an improvement.=0D =0D Cc: Quentin Schulz =0D Signed-off-by: Quentin Schulz =0D ---=0D drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c | 17 +++++------------= =0D 1 file changed, 5 insertions(+), 12 deletions(-)=0D =0D diff --git a/drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c b/drivers/g= pu/drm/panel/panel-leadtek-ltk050h3146w.c=0D index ecfa4181c4fd9..9d87cc1a357e3 100644=0D --- a/drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c=0D +++ b/drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c=0D @@ -650,20 +650,13 @@ static int ltk050h3146w_probe(struct mipi_dsi_device = *dsi)=0D return dev_err_probe(dev, PTR_ERR(ctx->reset_gpio), "cannot get reset gp= io\n");=0D =0D ctx->vci =3D devm_regulator_get(dev, "vci");=0D - if (IS_ERR(ctx->vci)) {=0D - ret =3D PTR_ERR(ctx->vci);=0D - if (ret !=3D -EPROBE_DEFER)=0D - dev_err(dev, "Failed to request vci regulator: %d\n", ret);=0D - return ret;=0D - }=0D + if (IS_ERR(ctx->vci))=0D + return dev_err_probe(dev, PTR_ERR(ctx->vci), "Failed to request vci regu= lator\n");=0D =0D ctx->iovcc =3D devm_regulator_get(dev, "iovcc");=0D - if (IS_ERR(ctx->iovcc)) {=0D - ret =3D PTR_ERR(ctx->iovcc);=0D - if (ret !=3D -EPROBE_DEFER)=0D - dev_err(dev, "Failed to request iovcc regulator: %d\n", ret);=0D - return ret;=0D - }=0D + if (IS_ERR(ctx->iovcc))=0D + return dev_err_probe(dev, PTR_ERR(ctx->iovcc),=0D + "Failed to request iovcc regulator\n");=0D =0D mipi_dsi_set_drvdata(dsi, ctx);=0D =0D =0D -- =0D 2.43.0=0D =0D