Skip to content

Commit aed45ab

Browse files
Dan Carpenterdaeinki
Dan Carpenter
authored andcommitted
drm/exynos: IS_ERR() vs NULL bug
of_iomap() doesn't return error pointers, it returns NULL on error. Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Gustavo Padovan <[email protected]> Signed-off-by: Inki Dae <[email protected]>
1 parent 5fcc3c8 commit aed45ab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/exynos/exynos7_drm_decon.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -888,8 +888,8 @@ static int decon_probe(struct platform_device *pdev)
888888
of_node_put(i80_if_timings);
889889

890890
ctx->regs = of_iomap(dev->of_node, 0);
891-
if (IS_ERR(ctx->regs)) {
892-
ret = PTR_ERR(ctx->regs);
891+
if (!ctx->regs) {
892+
ret = -ENOMEM;
893893
goto err_del_component;
894894
}
895895

0 commit comments

Comments
 (0)