Skip to content

Commit

Permalink
msm/fbdev: fix unused variable warning with clang.
Browse files Browse the repository at this point in the history
clang builds showed this:
drivers/gpu/drm/msm/msm_fbdev.c:144:6: error: variable 'helper' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
        if (!fbdev)
            ^~~~~~

Fixes: 3fb1f62 ("drm/fb-helper: Remove drm_fb_helper_unprepare() from drm_fb_helper_fini()")
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
airlied committed Feb 22, 2023
1 parent 13daf53 commit a48bba9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/msm/msm_fbdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ struct drm_fb_helper *msm_fbdev_init(struct drm_device *dev)

fbdev = kzalloc(sizeof(*fbdev), GFP_KERNEL);
if (!fbdev)
goto fail;
return NULL;

helper = &fbdev->base;

Expand Down

0 comments on commit a48bba9

Please sign in to comment.