Commit 53e9d838 authored by Dan Carpenter's avatar Dan Carpenter Committed by Mauro Carvalho Chehab

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

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

Fixes: 50e76151 ("media: platform: Add Cedrus VPU decoder driver")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarPaul Kocialkowski <paul.kocialkowski@bootlin.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 230bce55
......@@ -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;
}
......
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