From: Jocelyn Falempe <jfalempe@redhat.com>
To: Javier Martinez Canillas <javierm@redhat.com>,
linux-kernel@vger.kernel.org
Cc: Thomas Zimmermann <tzimmermann@suse.de>,
Maxime Ripard <mripard@kernel.org>,
dri-devel@lists.freedesktop.org,
Dan Carpenter <dan.carpenter@linaro.org>
Subject: Re: [PATCH] drm/ssd130x: Fix possible uninitialized usage of crtc_state variable
Date: Fri, 27 Oct 2023 10:21:42 +0200 [thread overview]
Message-ID: <b048247c-75e9-488e-a4f3-b227a38bca5e@redhat.com> (raw)
In-Reply-To: <20231020225338.1686974-1-javierm@redhat.com>
Hi,
On 21/10/2023 00:52, Javier Martinez Canillas wrote:
> Avoid a possible uninitialized use of the crtc_state variable in function
> ssd132x_primary_plane_atomic_check() and avoid the following Smatch warn:
>
> drivers/gpu/drm/solomon/ssd130x.c:921 ssd132x_primary_plane_atomic_check()
> error: uninitialized symbol 'crtc_state'.
That looks trivial, so you can add:
Acked-by: Jocelyn Falempe <jfalempe@redhat.com>
>
> Fixes: fdd591e00a9c ("drm/ssd130x: Add support for the SSD132x OLED controller family")
> Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> Closes: https://lore.kernel.org/dri-devel/7dd6ca45-8263-44fe-a318-2fd9d761425d@moroto.mountain/
> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
> ---
>
> drivers/gpu/drm/solomon/ssd130x.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/solomon/ssd130x.c b/drivers/gpu/drm/solomon/ssd130x.c
> index 32f0857aec9f..e0174f82e353 100644
> --- a/drivers/gpu/drm/solomon/ssd130x.c
> +++ b/drivers/gpu/drm/solomon/ssd130x.c
> @@ -910,7 +910,7 @@ static int ssd132x_primary_plane_atomic_check(struct drm_plane *plane,
> struct drm_plane_state *plane_state = drm_atomic_get_new_plane_state(state, plane);
> struct ssd130x_plane_state *ssd130x_state = to_ssd130x_plane_state(plane_state);
> struct drm_crtc *crtc = plane_state->crtc;
> - struct drm_crtc_state *crtc_state;
> + struct drm_crtc_state *crtc_state = NULL;
> const struct drm_format_info *fi;
> unsigned int pitch;
> int ret;
next prev parent reply other threads:[~2023-10-27 8:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-20 22:52 Javier Martinez Canillas
2023-10-27 8:21 ` Jocelyn Falempe [this message]
2023-10-27 9:31 ` Javier Martinez Canillas
2023-10-31 9:56 ` Geert Uytterhoeven
2023-10-31 10:11 ` Javier Martinez Canillas
2023-10-31 10:31 ` Geert Uytterhoeven
2023-10-31 11:27 ` Javier Martinez Canillas
2023-10-31 11:53 ` Maxime Ripard
2023-10-31 13:00 ` Geert Uytterhoeven
2023-10-31 13:52 ` Maxime Ripard
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=b048247c-75e9-488e-a4f3-b227a38bca5e@redhat.com \
--to=jfalempe@redhat.com \
--cc=dan.carpenter@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=javierm@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mripard@kernel.org \
--cc=tzimmermann@suse.de \
/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®