[PATCH 6/7] drm/stm: ltdc: Remove unnecessary platform_get_resource() error check
Fabio Estevam
festevam at gmail.com
Mon Dec 18 13:02:29 UTC 2017
From: Fabio Estevam <fabio.estevam at nxp.com>
devm_ioremap_resource() already checks if the resource is NULL, so
remove the unnecessary platform_get_resource() error check.
Cc: Philippe Cornu <philippe.cornu at st.com>
Signed-off-by: Fabio Estevam <fabio.estevam at nxp.com>
---
drivers/gpu/drm/stm/ltdc.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
index 394613b..6dc5d4e 100644
--- a/drivers/gpu/drm/stm/ltdc.c
+++ b/drivers/gpu/drm/stm/ltdc.c
@@ -901,12 +901,6 @@ int ltdc_load(struct drm_device *ddev)
}
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res) {
- DRM_ERROR("Unable to get resource\n");
- ret = -ENODEV;
- goto err;
- }
-
ldev->regs = devm_ioremap_resource(dev, res);
if (IS_ERR(ldev->regs)) {
DRM_ERROR("Unable to get ltdc registers\n");
--
2.7.4
More information about the dri-devel
mailing list