drm/bridge: analogix_dp: Fix a NULL vs IS_ERR() check in probe()
Subsystems (4)
PATCH 1/1 drm/bridge: analogix_dp: Fix a NULL vs IS_ERR() check in probe()
The devm_drm_bridge_alloc() function doesn't return NULL pointers, it returns error pointers. Update the error checking to match.
Fixes 48f05c3b4b70 ("drm/bridge: analogix_dp: Use devm_drm_bridge_alloc() API")
Signed-off-by Dan Carpenter <[email protected]>
--- drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +2 -2
@@ -1474,8 +1474,8 @@ analogix_dp_probe(struct device *dev, struct analogix_dp_plat_data *plat_data) dp = devm_drm_bridge_alloc(dev, struct analogix_dp_device, bridge, &analogix_dp_bridge_funcs); -if (!dp) -return ERR_PTR (-ENOMEM ); +if (IS_ERR (dp)) +return dp; dp->dev = &pdev->dev; dp->dpms_mode =DRM_MODE_DPMS_OFF ;
Signature · 1 line
2.47.2
Luca Ceresoli
reviewerHello Dan,
Quoted 5 lines · On Wed, 6 Aug 2025 14:45:36 +0300 Dan Carpenter <[email protected]>…
The
devm_drm_bridge_alloc()function doesn't return NULL pointers, it returns error pointers. Update the error checking to match.Fixes 48f05c3b4b70 ("drm/bridge: analogix_dp: Use devm_drm_bridge_alloc() API")Signed-off-by Dan Carpenter <[email protected]>
Thanks! You fix is correct, but an equivalent patch has been sent a few hours ago, so I guess that one should be applied:
https://lore.kernel.org/all/[email protected]/
Best regards,
Luca
Signature · 3 lines
Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com