Commit 44390ef5 authored by Dan Carpenter's avatar Dan Carpenter Committed by Linus Walleij

drm/tve200: Check for IS_ERR instead of NULL in probe

devm_ioremap_resource() returns error pointer, it never returns NULL on
error.

Fixes: 179c02fe ("drm/tve200: Add new driver for TVE200")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20170925102520.a7spymwqqbsczzz2@mwanda
parent 4ea30958
......@@ -225,7 +225,7 @@ static int tve200_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
priv->regs = devm_ioremap_resource(dev, res);
if (!priv->regs) {
if (IS_ERR(priv->regs)) {
dev_err(dev, "%s failed mmio\n", __func__);
ret = -EINVAL;
goto clk_disable;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment