mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-02 08:34:20 +08:00
c176060a4c
Clang warns (or errors with CONFIG_WERROR):
../drivers/gpu/drm/omapdrm/omap_fbdev.c:235:6: error: variable 'helper' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
if (!fbdev)
^~~~~~
../drivers/gpu/drm/omapdrm/omap_fbdev.c:259:26: note: uninitialized use occurs here
drm_fb_helper_unprepare(helper);
^~~~~~
../drivers/gpu/drm/omapdrm/omap_fbdev.c:235:2: note: remove the 'if' if its condition is always false
if (!fbdev)
^~~~~~~~~~~
../drivers/gpu/drm/omapdrm/omap_fbdev.c:228:30: note: initialize the variable 'helper' to silence this warning
struct drm_fb_helper *helper;
^
= NULL
1 error generated.
Return early, as there is nothing for the function to do if memory
cannot be allocated. There is no point in adding another label to just
emit the warning at the end of the function in this case, as memory
allocation failures are already logged.
Fixes:
|
||
---|---|---|
.. | ||
dss | ||
Kconfig | ||
Makefile | ||
omap_crtc.c | ||
omap_crtc.h | ||
omap_debugfs.c | ||
omap_dmm_priv.h | ||
omap_dmm_tiler.c | ||
omap_dmm_tiler.h | ||
omap_drv.c | ||
omap_drv.h | ||
omap_encoder.c | ||
omap_encoder.h | ||
omap_fb.c | ||
omap_fb.h | ||
omap_fbdev.c | ||
omap_fbdev.h | ||
omap_gem_dmabuf.c | ||
omap_gem.c | ||
omap_gem.h | ||
omap_irq.c | ||
omap_irq.h | ||
omap_overlay.c | ||
omap_overlay.h | ||
omap_plane.c | ||
omap_plane.h | ||
tcm-sita.c | ||
tcm.h | ||
TODO |