mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-11 13:04:03 +08:00
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:
parent
230bce5511
commit
53e9d83827
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user