android_kernel_oneplus_msm8998/drivers/gpu/drm/exynos
Arnd Bergmann 8a618bc7e5 drm/exynos: fix error handling in exynos_drm_subdrv_open
commit 55c4b906aa2aec3fa66310ec03c6842e34a04b2a upstream.

gcc-6 warns about a pointless loop in exynos_drm_subdrv_open:

drivers/gpu/drm/exynos/exynos_drm_core.c: In function 'exynos_drm_subdrv_open':
drivers/gpu/drm/exynos/exynos_drm_core.c:104:199: error: self-comparison always evaluates to false [-Werror=tautological-compare]
  list_for_each_entry_reverse(subdrv, &subdrv->list, list) {

Here, the list_for_each_entry_reverse immediately terminates because
the subdrv pointer is compared to itself as the loop end condition.

If we were to take the current subdrv pointer as the start of the
list (as we would do if list_for_each_entry_reverse() was not a macro),
we would iterate backwards over the &exynos_drm_subdrv_list anchor,
which would be even worse.

Instead, we need to use list_for_each_entry_continue_reverse()
to go back over each subdrv that was successfully opened until
the first entry.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-10 16:36:36 +01:00
..
exynos7_drm_decon.c drm/exynos: add cursor plane support 2015-10-26 15:10:27 +09:00
exynos5433_drm_decon.c drm/exynos/decon5433: add support for DECON-TV 2015-11-03 11:46:37 +09:00
exynos_dp_core.c drm/exynos: dp: remove suspend/resume functions 2015-10-01 13:23:13 +09:00
exynos_dp_core.h
exynos_dp_reg.c
exynos_dp_reg.h
exynos_drm_core.c drm/exynos: fix error handling in exynos_drm_subdrv_open 2016-11-10 16:36:36 +01:00
exynos_drm_crtc.c drm/exynos: atomic check only enabled crtc states 2015-12-20 01:39:10 +09:00
exynos_drm_crtc.h drm/irq: Use unsigned int pipe in public API 2015-10-06 12:57:47 +02:00
exynos_drm_dpi.c
exynos_drm_drv.c drm/exynos: separate Mixer and HDMI drivers 2015-11-03 11:46:38 +09:00
exynos_drm_drv.h drm/exynos: add atomic_check callback to exynos_crtc 2015-11-03 11:46:37 +09:00
exynos_drm_dsi.c
exynos_drm_fb.c drm/exynos: cleanup name of gem object for exynos_drm 2015-10-26 15:10:34 +09:00
exynos_drm_fb.h drm/exynos: cleanup name of gem object for exynos_drm 2015-10-26 15:10:34 +09:00
exynos_drm_fbdev.c drm/exynos: cleanup name of gem object for exynos_drm 2015-10-26 15:10:34 +09:00
exynos_drm_fbdev.h
exynos_drm_fimc.c drm/exynos: fix spelling errors 2015-10-26 15:10:17 +09:00
exynos_drm_fimc.h
exynos_drm_fimd.c drm/exynos: add cursor plane support 2015-10-26 15:10:27 +09:00
exynos_drm_g2d.c drm/exynos: Remove useless EXPORT_SYMBOL_GPLs 2015-09-30 16:39:41 +09:00
exynos_drm_g2d.h
exynos_drm_gem.c drm/exynos/gem: remove DMA-mapping hacks used for constructing page array 2015-11-03 11:46:39 +09:00
exynos_drm_gem.h drm/exynos: cleanup name of gem object for exynos_drm 2015-10-26 15:10:34 +09:00
exynos_drm_gsc.c drm/exynos: fix spelling errors 2015-10-26 15:10:17 +09:00
exynos_drm_gsc.h
exynos_drm_iommu.c drm/exynos: fix to detach device of iommu 2015-10-26 15:10:30 +09:00
exynos_drm_iommu.h
exynos_drm_ipp.c
exynos_drm_ipp.h
exynos_drm_mic.c
exynos_drm_plane.c drm/exynos: cleanup name of gem object for exynos_drm 2015-10-26 15:10:34 +09:00
exynos_drm_plane.h drm/exynos: add cursor plane support 2015-10-26 15:10:27 +09:00
exynos_drm_rotator.c drm/exynos: rotator: Clock control is unused if !PM 2015-09-30 16:44:14 +09:00
exynos_drm_rotator.h
exynos_drm_vidi.c drm/exynos: add cursor plane support 2015-10-26 15:10:27 +09:00
exynos_drm_vidi.h
exynos_hdmi.c drm/exynos/mixer: replace direct cross-driver call with drm mode validation 2015-11-03 11:46:38 +09:00
exynos_mixer.c drm/exynos/mixer: replace direct cross-driver call with drm mode validation 2015-11-03 11:46:38 +09:00
Kconfig drm/exynos: simplify Kconfig component names 2015-11-03 11:46:38 +09:00
Makefile drm/exynos: separate Mixer and HDMI drivers 2015-11-03 11:46:38 +09:00
regs-fimc.h
regs-gsc.h
regs-hdmi.h drm/exynos/hdmi: improve HDMI/ACR related code 2015-10-26 15:10:04 +09:00
regs-mixer.h
regs-rotator.h
regs-vp.h