mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/bridge: panel: convert to use ERR_CAST()
@ 2025-07-19  8:47 zhang.enpei
  2025-08-04 15:17 ` neil.armstrong
  0 siblings, 1 reply; 2+ messages in thread
From: zhang.enpei @ 2025-07-19  8:47 UTC (permalink / raw)
  To: andrzej.hajda
  Cc: neil.armstrong, rfoss, laurent.pinchart, jonas, jernej.skrabec,
	maarten.lankhorst, mripard, tzimmermann, airlied, simona,
	dri-devel, linux-kernel

From: Zhang Enpei <zhang.enpei@zte.com.cn>

Use ERR_CAST() since the macro clearly indicates that this is a pointer
to an error value and a type conversion was performed.

Signed-off-by: Zhang Enpei <zhang.enpei@zte.com.cn>
---
 drivers/gpu/drm/bridge/panel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/bridge/panel.c b/drivers/gpu/drm/bridge/panel.c
index 184a8b7049a7..7d2d67e56cee 100644
--- a/drivers/gpu/drm/bridge/panel.c
+++ b/drivers/gpu/drm/bridge/panel.c
@@ -291,7 +291,7 @@ struct drm_bridge *drm_panel_bridge_add_typed(struct drm_panel *panel,
        panel_bridge = devm_drm_bridge_alloc(panel->dev, struct panel_bridge, bridge,
                                             &panel_bridge_bridge_funcs);
        if (IS_ERR(panel_bridge))
-               return (void *)panel_bridge;
+               return ERR_CAST(panel_bridge);

        panel_bridge->connector_type = connector_type;
        panel_bridge->panel = panel;
-- 
2.25.1

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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-19  8:47 [PATCH] drm/bridge: panel: convert to use ERR_CAST() zhang.enpei
2025-08-04 15:17 ` 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®