diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2017-09-25 13:25:20 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2017-10-01 02:29:54 +0300 |
commit | 44390ef519006b13c8fab9eb13abac909342a585 (patch) | |
tree | 2abadb1196c9b0c484881578f341b1cdbbae6603 /drivers/gpu/drm/tve200/tve200_drv.c | |
parent | 4ea30958d96b3f997afadeeb9de29e6dea3a80f5 (diff) | |
download | linux-44390ef519006b13c8fab9eb13abac909342a585.tar.xz |
drm/tve200: Check for IS_ERR instead of NULL in probe
devm_ioremap_resource() returns error pointer, it never returns NULL on
error.
Fixes: 179c02fe90a4 ("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
Diffstat (limited to 'drivers/gpu/drm/tve200/tve200_drv.c')
-rw-r--r-- | drivers/gpu/drm/tve200/tve200_drv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/tve200/tve200_drv.c b/drivers/gpu/drm/tve200/tve200_drv.c index eae38b669f0a..6939f7455a2d 100644 --- a/drivers/gpu/drm/tve200/tve200_drv.c +++ b/drivers/gpu/drm/tve200/tve200_drv.c @@ -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; |