Commit ad517059 authored by Dan Carpenter's avatar Dan Carpenter Committed by Dmitry Baryshkov

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: 69a88d86 ("drm/msm/hdmi: move resource allocation to probe function")
Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Reviewed-by: default avatarAbhinav Kumar <quic_abhinavk@quicinc.com>
Patchwork: https://patchwork.freedesktop.org/patch/512163/
Link: https://lore.kernel.org/r/Y3eCqQ2pm1uQnktV@kadamSigned-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
parent 43736546
......@@ -138,8 +138,7 @@ static int msm_hdmi_init(struct hdmi *hdmi)
return 0;
fail:
if (hdmi)
msm_hdmi_destroy(hdmi);
msm_hdmi_destroy(hdmi);
return ret;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment