From: Hans Verkuil Date: Wed, 5 Nov 2014 08:03:00 +0000 (-0300) Subject: [media] ti-vpe: fix sparse warnings X-Git-Tag: v3.19-rc1~126^2~200 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=3f7991357f6b33c82bf2135725847970ffd2ed83;p=karo-tx-linux.git [media] ti-vpe: fix sparse warnings sc.c:303:26: warning: incorrect type in return expression (different address spaces) csc.c:188:27: warning: incorrect type in return expression (different address spaces) Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/ti-vpe/csc.c b/drivers/media/platform/ti-vpe/csc.c index 44fbf41fba7f..bec674994752 100644 --- a/drivers/media/platform/ti-vpe/csc.c +++ b/drivers/media/platform/ti-vpe/csc.c @@ -185,7 +185,7 @@ struct csc_data *csc_create(struct platform_device *pdev) csc->base = devm_ioremap_resource(&pdev->dev, csc->res); if (IS_ERR(csc->base)) { dev_err(&pdev->dev, "failed to ioremap\n"); - return csc->base; + return ERR_CAST(csc->base); } return csc; diff --git a/drivers/media/platform/ti-vpe/sc.c b/drivers/media/platform/ti-vpe/sc.c index 1088381bd349..f82d1c7f667f 100644 --- a/drivers/media/platform/ti-vpe/sc.c +++ b/drivers/media/platform/ti-vpe/sc.c @@ -300,7 +300,7 @@ struct sc_data *sc_create(struct platform_device *pdev) sc->base = devm_ioremap_resource(&pdev->dev, sc->res); if (IS_ERR(sc->base)) { dev_err(&pdev->dev, "failed to ioremap\n"); - return sc->base; + return ERR_CAST(sc->base); } return sc;