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

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

Fixes: 179c02fe90 ("drm/tve200: Add new driver for TVE200")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20170925102520.a7spymwqqbsczzz2@mwanda
This commit is contained in:
Dan Carpenter 2017-09-25 13:25:20 +03:00 committed by Linus Walleij
parent 4ea30958d9
commit 44390ef519
1 changed files with 1 additions and 1 deletions

View File

@ -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;