[media] v4l: ti-vpe: fix devm_ioremap_resource() return value checking
devm_ioremap_resource() returns a pointer to the remapped memory or an ERR_PTR() encoded error code on failure. Fix the checks inside csc_create() and sc_create() accordingly. Cc: Archit Taneja <archit@ti.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Tested-by: Archit Taneja<archit@ti.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
This commit is contained in:
Родитель
25c61e4cfc
Коммит
691903f932
|
@ -187,9 +187,9 @@ struct csc_data *csc_create(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
csc->base = devm_ioremap_resource(&pdev->dev, csc->res);
|
||||
if (!csc->base) {
|
||||
if (IS_ERR(csc->base)) {
|
||||
dev_err(&pdev->dev, "failed to ioremap\n");
|
||||
return ERR_PTR(-ENOMEM);
|
||||
return csc->base;
|
||||
}
|
||||
|
||||
return csc;
|
||||
|
|
|
@ -302,9 +302,9 @@ struct sc_data *sc_create(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
sc->base = devm_ioremap_resource(&pdev->dev, sc->res);
|
||||
if (!sc->base) {
|
||||
if (IS_ERR(sc->base)) {
|
||||
dev_err(&pdev->dev, "failed to ioremap\n");
|
||||
return ERR_PTR(-ENOMEM);
|
||||
return sc->base;
|
||||
}
|
||||
|
||||
return sc;
|
||||
|
|
Загрузка…
Ссылка в новой задаче