Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/stm: ltdc: Remove unnecessary platform_get_resource() error check

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

authored by

Fabio Estevam and committed by
Benjamin Gaignard
eb393dbc 6cf7e40b

-6
-6
drivers/gpu/drm/stm/ltdc.c
··· 901 901 } 902 902 903 903 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 904 - if (!res) { 905 - DRM_ERROR("Unable to get resource\n"); 906 - ret = -ENODEV; 907 - goto err; 908 - } 909 - 910 904 ldev->regs = devm_ioremap_resource(dev, res); 911 905 if (IS_ERR(ldev->regs)) { 912 906 DRM_ERROR("Unable to get ltdc registers\n");