linux/drivers/gpu/drm/exynos
Nathan Chancellor 756924bc18 drm/exynos: Always initialize mapping in exynos_drm_register_dma()
[ Upstream commit c626f3864b ]

In certain randconfigs, clang warns:

drivers/gpu/drm/exynos/exynos_drm_dma.c:121:19: warning: variable
'mapping' is uninitialized when used here [-Wuninitialized]
                priv->mapping = mapping;
                                ^~~~~~~
drivers/gpu/drm/exynos/exynos_drm_dma.c:111:16: note: initialize the
variable 'mapping' to silence this warning
                void *mapping;
                             ^
                              = NULL
1 warning generated.

This occurs when CONFIG_EXYNOS_IOMMU is enabled and both
CONFIG_ARM_DMA_USE_IOMMU and CONFIG_IOMMU_DMA are disabled, which makes
the code look like

  void *mapping;

  if (0)
    mapping = arm_iommu_create_mapping()
  else if (0)
    mapping = iommu_get_domain_for_dev()

  ...
  priv->mapping = mapping;

Add an else branch that initializes mapping to the -ENODEV error pointer
so that there is no more warning and the driver does not change during
runtime.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-09-18 13:40:30 +02:00
..
exynos_dp.c
exynos_drm_crtc.c
exynos_drm_crtc.h
exynos_drm_dma.c drm/exynos: Always initialize mapping in exynos_drm_register_dma() 2021-09-18 13:40:30 +02:00
exynos_drm_dpi.c drm: Remove unnecessary drm_panel_attach and drm_panel_detach 2020-08-08 09:06:33 +02:00
exynos_drm_drv.c
exynos_drm_drv.h
exynos_drm_dsi.c drm/exynos: dsi: Simplify with dev_err_probe() 2020-09-21 10:58:48 +09:00
exynos_drm_fb.c
exynos_drm_fb.h
exynos_drm_fbdev.c drm/exynos: gem: Fix sparse warning 2020-08-26 16:03:05 +09:00
exynos_drm_fbdev.h
exynos_drm_fimc.c
exynos_drm_fimd.c
exynos_drm_g2d.c drm: exynos: fix common struct sg_table related issues 2020-09-10 08:18:35 +02:00
exynos_drm_g2d.h
exynos_drm_gem.c dma-mapping updates for 5.10 2020-10-15 14:43:29 -07:00
exynos_drm_gem.h drm/exynos: gem: Fix sparse warning 2020-08-26 16:03:05 +09:00
exynos_drm_gsc.c
exynos_drm_ipp.c
exynos_drm_ipp.h
exynos_drm_mic.c drm/exynos: fix ref count leak in mic_pre_enable 2020-06-29 09:38:41 +09:00
exynos_drm_plane.c
exynos_drm_plane.h
exynos_drm_rotator.c
exynos_drm_scaler.c
exynos_drm_vidi.c
exynos_drm_vidi.h
exynos_hdmi.c drm/exynos: hdmi: Simplify with dev_err_probe() 2020-09-21 10:58:48 +09:00
exynos_mixer.c drm-misc-next for v5.9: 2020-06-24 15:45:51 +10:00
exynos7_drm_decon.c
exynos5433_drm_decon.c
Kconfig drm/exynos: depend on COMMON_CLK to fix compile tests 2020-11-23 10:01:32 +09:00
Makefile
regs-decon7.h
regs-decon5433.h
regs-fimc.h
regs-gsc.h
regs-hdmi.h
regs-mixer.h
regs-rotator.h
regs-scaler.h
regs-vp.h