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

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®