Skip to content

Commit

Permalink
drm/stm: ltdc: Remove unnecessary platform_get_resource() error check
Browse files Browse the repository at this point in the history
devm_ioremap_resource() already checks if the resource is NULL, so
remove the unnecessary platform_get_resource() error check.

Cc: Philippe Cornu <philippe.cornu@st.com>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Acked-by: Philippe Cornu <philippe.cornu@st.com>
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1513602150-7542-6-git-send-email-festevam@gmail.com
  • Loading branch information
Fabio Estevam authored and Benjamin Gaignard committed Dec 19, 2017
1 parent 6cf7e40 commit eb393db
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions drivers/gpu/drm/stm/ltdc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit eb393db

Please sign in to comment.