diff options
author | Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> | 2014-03-18 07:41:42 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-05-23 12:14:49 -0300 |
commit | 691903f932c5feafc149e2877478ef26b198eddb (patch) | |
tree | 7287b0e589e92f1a5846d0ab4758332a6d72f872 | |
parent | 25c61e4cfc2fc69d62cc07befc075a2883b047a1 (diff) | |
download | op-kernel-dev-691903f932c5feafc149e2877478ef26b198eddb.zip op-kernel-dev-691903f932c5feafc149e2877478ef26b198eddb.tar.gz |
[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>
-rw-r--r-- | drivers/media/platform/ti-vpe/csc.c | 4 | ||||
-rw-r--r-- | drivers/media/platform/ti-vpe/sc.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/platform/ti-vpe/csc.c b/drivers/media/platform/ti-vpe/csc.c index acfea50..3374e04 100644 --- a/drivers/media/platform/ti-vpe/csc.c +++ b/drivers/media/platform/ti-vpe/csc.c @@ -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; diff --git a/drivers/media/platform/ti-vpe/sc.c b/drivers/media/platform/ti-vpe/sc.c index 93f0af54..6314171 100644 --- a/drivers/media/platform/ti-vpe/sc.c +++ b/drivers/media/platform/ti-vpe/sc.c @@ -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; |