summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/omapdrm/dss/rfbi.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2017-05-07 00:29:09 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2017-06-02 10:57:09 +0300
commitb22622f0cba3a6ee780787abd84b3b0c1ad09b26 (patch)
treea267206f7dc980efd23e9cd49e327787656bc0d1 /drivers/gpu/drm/omapdrm/dss/rfbi.c
parentc488dd2048662f35c56d002379221edf1a2a9404 (diff)
drm: omapdrm: Remove duplicate error messages when mapping memory
The devm_ioremap_resource() call can handle being given a NULL resource, and prints an error message when mapping fails. Switch the remaining devm_ioremap() calls to devm_ioremap_resource() and remove all extraneous resource NULL checks and error messages printed manually by the driver. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/dss/rfbi.c')
-rw-r--r--drivers/gpu/drm/omapdrm/dss/rfbi.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/rfbi.c b/drivers/gpu/drm/omapdrm/dss/rfbi.c
index 09724757366a..bf6b96877daf 100644
--- a/drivers/gpu/drm/omapdrm/dss/rfbi.c
+++ b/drivers/gpu/drm/omapdrm/dss/rfbi.c
@@ -965,17 +965,9 @@ static int rfbi_bind(struct device *dev, struct device *master, void *data)
sema_init(&rfbi.bus_lock, 1);
rfbi_mem = platform_get_resource(rfbi.pdev, IORESOURCE_MEM, 0);
- if (!rfbi_mem) {
- DSSERR("can't get IORESOURCE_MEM RFBI\n");
- return -EINVAL;
- }
-
- rfbi.base = devm_ioremap(&pdev->dev, rfbi_mem->start,
- resource_size(rfbi_mem));
- if (!rfbi.base) {
- DSSERR("can't ioremap RFBI\n");
- return -ENOMEM;
- }
+ rfbi.base = devm_ioremap_resource(&pdev->dev, rfbi_mem);
+ if (IS_ERR(rfbi.base))
+ return PTR_ERR(rfbi.base);
clk = clk_get(&pdev->dev, "ick");
if (IS_ERR(clk)) {