All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH next] drm: bridge: waveshare-dsi: Fix NULL vs IS_ERR() check in probe()
@ 2025-08-21 12:30 Dan Carpenter
  2025-08-22  1:46 ` Joseph Guo
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2025-08-21 12:30 UTC (permalink / raw)
  To: Joseph Guo
  Cc: Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
	Jonas Karlman, Jernej Skrabec, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, dri-devel,
	linux-kernel, kernel-janitors

The devm_drm_bridge_alloc() function returns error pointers, it never
returns NULL.  Fix the checking to match.

Fixes: dbdea37add13 ("drm: bridge: Add waveshare DSI2DPI unit driver")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
 drivers/gpu/drm/bridge/waveshare-dsi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/bridge/waveshare-dsi.c b/drivers/gpu/drm/bridge/waveshare-dsi.c
index 01c70e7d3d3b..43f4e7412d72 100644
--- a/drivers/gpu/drm/bridge/waveshare-dsi.c
+++ b/drivers/gpu/drm/bridge/waveshare-dsi.c
@@ -147,8 +147,8 @@ static int ws_bridge_probe(struct i2c_client *i2c)
 	int ret;
 
 	ws = devm_drm_bridge_alloc(dev, struct ws_bridge, bridge, &ws_bridge_bridge_funcs);
-	if (!ws)
-		return -ENOMEM;
+	if (IS_ERR(ws))
+		return PTR_ERR(ws);
 
 	ws->dev = dev;
 
-- 
2.47.2


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

end of thread, other threads:[~2025-08-22  1:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-21 12:30 [PATCH next] drm: bridge: waveshare-dsi: Fix NULL vs IS_ERR() check in probe() Dan Carpenter
2025-08-22  1:46 ` Joseph Guo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.