mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm: panel: orisetech: improve error handling during probe
@ 2025-07-24 16:08 Akhilesh Patil
  2025-08-04 15:19 ` neil.armstrong
  2025-08-04 15:32 ` Neil Armstrong
  0 siblings, 2 replies; 3+ messages in thread
From: Akhilesh Patil @ 2025-07-24 16:08 UTC (permalink / raw)
  To: neil.armstrong, quic_jesszhan, maarten.lankhorst, mripard,
	tzimmermann, airlied, simona, asrivats
  Cc: dri-devel, linux-kernel, akhileshpatilvnit, skhan

Use dev_err_probe() helper as directed by core driver model to handle
driver probe error. Use standard helper defined at drivers/base/core.c
to maintain code consistency.

Inspired by,
commit a787e5400a1ce ("driver core: add device probe log helper")

Signed-off-by: Akhilesh Patil <akhilesh@ee.iitb.ac.in>
---
 drivers/gpu/drm/panel/panel-orisetech-ota5601a.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-orisetech-ota5601a.c b/drivers/gpu/drm/panel/panel-orisetech-ota5601a.c
index fc87f61d4400..e971d1536654 100644
--- a/drivers/gpu/drm/panel/panel-orisetech-ota5601a.c
+++ b/drivers/gpu/drm/panel/panel-orisetech-ota5601a.c
@@ -277,11 +277,8 @@ static int ota5601a_probe(struct spi_device *spi)
 		       DRM_MODE_CONNECTOR_DPI);
 
 	err = drm_panel_of_backlight(&panel->drm_panel);
-	if (err) {
-		if (err != -EPROBE_DEFER)
-			dev_err(dev, "Failed to get backlight handle\n");
-		return err;
-	}
+	if (err)
+		return dev_err_probe(dev, err, "Failed to get backlight handle\n");
 
 	drm_panel_add(&panel->drm_panel);
 
-- 
2.34.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm: panel: orisetech: improve error handling during probe
  2025-07-24 16:08 [PATCH] drm: panel: orisetech: improve error handling during probe Akhilesh Patil
@ 2025-08-04 15:19 ` neil.armstrong
  2025-08-04 15:32 ` Neil Armstrong
  1 sibling, 0 replies; 3+ messages in thread
From: neil.armstrong @ 2025-08-04 15:19 UTC (permalink / raw)
  To: Akhilesh Patil, quic_jesszhan, maarten.lankhorst, mripard,
	tzimmermann, airlied, simona, asrivats
  Cc: dri-devel, linux-kernel, akhileshpatilvnit, skhan

On 24/07/2025 18:08, Akhilesh Patil wrote:
> Use dev_err_probe() helper as directed by core driver model to handle
> driver probe error. Use standard helper defined at drivers/base/core.c
> to maintain code consistency.
> 
> Inspired by,
> commit a787e5400a1ce ("driver core: add device probe log helper")
> 
> Signed-off-by: Akhilesh Patil <akhilesh@ee.iitb.ac.in>
> ---
>   drivers/gpu/drm/panel/panel-orisetech-ota5601a.c | 7 ++-----
>   1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/panel/panel-orisetech-ota5601a.c b/drivers/gpu/drm/panel/panel-orisetech-ota5601a.c
> index fc87f61d4400..e971d1536654 100644
> --- a/drivers/gpu/drm/panel/panel-orisetech-ota5601a.c
> +++ b/drivers/gpu/drm/panel/panel-orisetech-ota5601a.c
> @@ -277,11 +277,8 @@ static int ota5601a_probe(struct spi_device *spi)
>   		       DRM_MODE_CONNECTOR_DPI);
>   
>   	err = drm_panel_of_backlight(&panel->drm_panel);
> -	if (err) {
> -		if (err != -EPROBE_DEFER)
> -			dev_err(dev, "Failed to get backlight handle\n");
> -		return err;
> -	}
> +	if (err)
> +		return dev_err_probe(dev, err, "Failed to get backlight handle\n");
>   
>   	drm_panel_add(&panel->drm_panel);
>   

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm: panel: orisetech: improve error handling during probe
  2025-07-24 16:08 [PATCH] drm: panel: orisetech: improve error handling during probe Akhilesh Patil
  2025-08-04 15:19 ` neil.armstrong
@ 2025-08-04 15:32 ` Neil Armstrong
  1 sibling, 0 replies; 3+ messages in thread
From: Neil Armstrong @ 2025-08-04 15:32 UTC (permalink / raw)
  To: quic_jesszhan, maarten.lankhorst, mripard, tzimmermann, airlied,
	simona, asrivats, Akhilesh Patil
  Cc: dri-devel, linux-kernel, akhileshpatilvnit, skhan

Hi,

On Thu, 24 Jul 2025 21:38:32 +0530, Akhilesh Patil wrote:
> Use dev_err_probe() helper as directed by core driver model to handle
> driver probe error. Use standard helper defined at drivers/base/core.c
> to maintain code consistency.
> 
> Inspired by,
> commit a787e5400a1ce ("driver core: add device probe log helper")
> 
> [...]

Thanks, Applied to https://gitlab.freedesktop.org/drm/misc/kernel.git (drm-misc-next)

[1/1] drm: panel: orisetech: improve error handling during probe
      https://gitlab.freedesktop.org/drm/misc/kernel/-/commit/640d512caa64b569e58a08b540d9c400e1aa8f94

-- 
Neil


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-08-04 15:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-24 16:08 [PATCH] drm: panel: orisetech: improve error handling during probe Akhilesh Patil
2025-08-04 15:19 ` neil.armstrong
2025-08-04 15:32 ` Neil Armstrong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®