mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-04 20:19:47 +08:00
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>
|
||
|---|---|---|
| .. | ||
| exynos7_drm_decon.c | ||
| exynos5433_drm_decon.c | ||
| exynos_dp.c | ||
| exynos_drm_crtc.c | ||
| exynos_drm_crtc.h | ||
| exynos_drm_dma.c | ||
| exynos_drm_dpi.c | ||
| exynos_drm_drv.c | ||
| exynos_drm_drv.h | ||
| exynos_drm_dsi.c | ||
| exynos_drm_fb.c | ||
| exynos_drm_fb.h | ||
| exynos_drm_fbdev.c | ||
| exynos_drm_fbdev.h | ||
| exynos_drm_fimc.c | ||
| exynos_drm_fimd.c | ||
| exynos_drm_g2d.c | ||
| exynos_drm_g2d.h | ||
| exynos_drm_gem.c | ||
| exynos_drm_gem.h | ||
| exynos_drm_gsc.c | ||
| exynos_drm_ipp.c | ||
| exynos_drm_ipp.h | ||
| exynos_drm_mic.c | ||
| 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 | ||
| exynos_mixer.c | ||
| Kconfig | ||
| 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 | ||