Commit 691903f9 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Mauro Carvalho Chehab

[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: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Tested-by: Archit Taneja<archit@ti.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent 25c61e4c
......@@ -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;
......
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