media: cedrus: Fix a NULL vs IS_ERR() check

The devm_ioremap_resource() function doesn't return NULL pointers, it
returns error pointers.

Fixes: 50e761516f ("media: platform: Add Cedrus VPU decoder driver")

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
Dan Carpenter 2018-11-26 03:10:44 -05:00 committed by Mauro Carvalho Chehab
parent 230bce5511
commit 53e9d83827

View File

@ -255,10 +255,10 @@ int cedrus_hw_probe(struct cedrus_dev *dev)
res = platform_get_resource(dev->pdev, IORESOURCE_MEM, 0);
dev->base = devm_ioremap_resource(dev->dev, res);
if (!dev->base) {
if (IS_ERR(dev->base)) {
v4l2_err(&dev->v4l2_dev, "Failed to map registers\n");
ret = -ENOMEM;
ret = PTR_ERR(dev->base);
goto err_sram;
}