Skip to content

Commit 4673dec

Browse files
Dan Carpenterlumag
authored andcommitted
drm/panel: nt37801: Fix IS_ERR() vs NULL check in probe()
The devm_drm_panel_alloc() function returns error pointers, it doesn't return NULL. Update the check to match. Fixes: 4fca684 ("drm/panel: Add Novatek NT37801 panel driver") Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Jessica Zhang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
1 parent 022546c commit 4673dec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/panel/panel-novatek-nt37801.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,8 @@ static int novatek_nt37801_probe(struct mipi_dsi_device *dsi)
257257
ctx = devm_drm_panel_alloc(dev, struct novatek_nt37801, panel,
258258
&novatek_nt37801_panel_funcs,
259259
DRM_MODE_CONNECTOR_DSI);
260-
if (!ctx)
261-
return -ENOMEM;
260+
if (IS_ERR(ctx))
261+
return PTR_ERR(ctx);
262262

263263
ret = devm_regulator_bulk_get_const(dev,
264264
ARRAY_SIZE(novatek_nt37801_supplies),

0 commit comments

Comments
 (0)