From: Yannick FERTRE <yannick.fertre@st.com>
To: Philippe CORNU <philippe.cornu@st.com>,
Benjamin Gaignard <benjamin.gaignard@linaro.org>,
Vincent ABRIOU <vincent.abriou@st.com>,
"Dan Carpenter" <dan.carpenter@oracle.com>,
David Airlie <airlied@linux.ie>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: Alexandre TORGUE <alexandre.torgue@st.com>
Subject: Re: [PATCH] drm/stm: ltdc: fix warning in ltdc_crtc_update_clut()
Date: Mon, 16 Apr 2018 09:18:49 +0000 [thread overview]
Message-ID: <f5b79561-0084-96f9-6986-0f17c11f0143@st.com> (raw)
In-Reply-To: <20180410135312.3553-1-philippe.cornu@st.com>
Reviewed-by: yannick fertre <yannick.fertre@st.com>
On 04/10/2018 03:53 PM, Philippe Cornu wrote:
> Fix the warning
> "warn: variable dereferenced before check 'crtc' (see line 390)"
> by removing unnecessary checks as ltdc_crtc_update_clut() is
> only called from ltdc_crtc_atomic_flush() where crtc and
> crtc->state are not NULL.
>
> Many thanks to Dan Carpenter for the bug report
> https://lists.freedesktop.org/archives/dri-devel/2018-February/166918.html
>
> Signed-off-by: Philippe Cornu <philippe.cornu@st.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> drivers/gpu/drm/stm/ltdc.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
> index 061d2b6e5157..e3121d9e4230 100644
> --- a/drivers/gpu/drm/stm/ltdc.c
> +++ b/drivers/gpu/drm/stm/ltdc.c
> @@ -392,9 +392,6 @@ static void ltdc_crtc_update_clut(struct drm_crtc *crtc)
> u32 val;
> int i;
>
> - if (!crtc || !crtc->state)
> - return;
> -
> if (!crtc->state->color_mgmt_changed || !crtc->state->gamma_lut)
> return;
>
next prev parent reply other threads:[~2018-04-16 9:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-10 13:53 Philippe Cornu
2018-04-16 9:18 ` Yannick FERTRE [this message]
2018-04-19 10:39 ` Philippe CORNU
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f5b79561-0084-96f9-6986-0f17c11f0143@st.com \
--to=yannick.fertre@st.com \
--cc=airlied@linux.ie \
--cc=alexandre.torgue@st.com \
--cc=benjamin.gaignard@linaro.org \
--cc=dan.carpenter@oracle.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=philippe.cornu@st.com \
--cc=vincent.abriou@st.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®