Skip to content

Commit ad51705

Browse files
error27lumag
authored andcommitted
drm/msm/hdmi: remove unnecessary NULL check
This code was recently refactored in commit and now the "hdmi" pointer can't be NULL. Checking for NULL leads to a Smatch warning: drivers/gpu/drm/msm/hdmi/hdmi.c:141 msm_hdmi_init() warn: variable dereferenced before check 'hdmi' (see line 119) Fixes: 69a88d8 ("drm/msm/hdmi: move resource allocation to probe function") Signed-off-by: Dan Carpenter <error27@gmail.com> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Patchwork: https://patchwork.freedesktop.org/patch/512163/ Link: https://lore.kernel.org/r/Y3eCqQ2pm1uQnktV@kadam Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
1 parent 4373654 commit ad51705

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

  • drivers/gpu/drm/msm/hdmi

drivers/gpu/drm/msm/hdmi/hdmi.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,7 @@ static int msm_hdmi_init(struct hdmi *hdmi)
138138
return 0;
139139

140140
fail:
141-
if (hdmi)
142-
msm_hdmi_destroy(hdmi);
141+
msm_hdmi_destroy(hdmi);
143142

144143
return ret;
145144
}

0 commit comments

Comments
 (0)