[PATCH 7/7] drm/tegra: vic: Remove unnecessary platform_get_resource() error check
Fabio Estevam
festevam at gmail.com
Mon Dec 18 13:02:30 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: Thierry Reding <thierry.reding at gmail.com>
Signed-off-by: Fabio Estevam <fabio.estevam at nxp.com>
---
drivers/gpu/drm/tegra/vic.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/gpu/drm/tegra/vic.c b/drivers/gpu/drm/tegra/vic.c
index f5794dd..088a795 100644
--- a/drivers/gpu/drm/tegra/vic.c
+++ b/drivers/gpu/drm/tegra/vic.c
@@ -304,11 +304,6 @@ static int vic_probe(struct platform_device *pdev)
return -ENOMEM;
regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!regs) {
- dev_err(&pdev->dev, "failed to get registers\n");
- return -ENXIO;
- }
-
vic->regs = devm_ioremap_resource(dev, regs);
if (IS_ERR(vic->regs))
return PTR_ERR(vic->regs);
--
2.7.4
More information about the dri-devel
mailing list