* [PATCH] drm/tiny: sharp-memory: handle enable GPIO errors
@ 2026-10-07 10:50 phucduc.bui
0 siblings, 0 replies; only message in thread
From: phucduc.bui @ 2026-10-07 10:50 UTC (permalink / raw)
To: Alex Lanzano, David Airlie, Simona Vetter, Dmitry Baryshkov,
Mehdi Djait, u.kleine-koenig, dri-devel, linux-kernel
Cc: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
devm_gpiod_get_optional() may return -EPROBE_DEFER or other errors,
but sharp_memory_probe() currently ignores them.
Check the return value and propagate errors from the enable GPIO lookup.
Fixes: b8f9f21716fe ("drm/tiny: Add driver for Sharp Memory LCD")
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
drivers/gpu/drm/tiny/sharp-memory.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/tiny/sharp-memory.c b/drivers/gpu/drm/tiny/sharp-memory.c
index 7efd7b567f3b..35254a2136c9 100644
--- a/drivers/gpu/drm/tiny/sharp-memory.c
+++ b/drivers/gpu/drm/tiny/sharp-memory.c
@@ -552,6 +552,9 @@ static int sharp_memory_probe(struct spi_device *spi)
return dev_err_probe(dev, ret, "Failed to initialize drm config\n");
smd->enable_gpio = devm_gpiod_get_optional(dev, "enable", GPIOD_OUT_HIGH);
+ if (IS_ERR(smd->enable_gpio))
+ return dev_err_probe(dev, PTR_ERR(smd->enable_gpio),
+ "Failed to get enable gpio\n");
if (!smd->enable_gpio)
dev_warn(dev, "Enable gpio not defined\n");
--
2.43.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-07 10:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-07 10:50 [PATCH] drm/tiny: sharp-memory: handle enable GPIO errors phucduc.bui
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®