From: Daniel Vetter <daniel@ffwll.ch>
To: Ander Conselvan de Oliveira
<ander.conselvan.de.oliveira@intel.com>,
dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/atomic: Don't try to free a NULL state
Date: Mon, 30 Mar 2015 16:52:43 +0200 [thread overview]
Message-ID: <20150330145243.GP23521@phenom.ffwll.local> (raw)
In-Reply-To: <20150330113533.GB7970@boom>
On Mon, Mar 30, 2015 at 02:35:33PM +0300, David Weinehall wrote:
> On Mon, Mar 30, 2015 at 02:05:43PM +0300, Ander Conselvan de Oliveira wrote:
> > Consistently with other free functions, handle the NULL case without
> > oopsing.
> >
> > Cc: dri-devel@lists.freedesktop.org
> > Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
> > ---
> > drivers/gpu/drm/drm_atomic.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
> > index 23034e8..88b2790 100644
> > --- a/drivers/gpu/drm/drm_atomic.c
> > +++ b/drivers/gpu/drm/drm_atomic.c
> > @@ -179,6 +179,9 @@ EXPORT_SYMBOL(drm_atomic_state_clear);
> > */
> > void drm_atomic_state_free(struct drm_atomic_state *state)
> > {
> > + if (!state)
> > + return;
> > +
> > drm_atomic_state_clear(state);
> >
> > DRM_DEBUG_ATOMIC("Freeing atomic state %p\n", state);
>
> It'd probably make sense to fix all code that uses
> drm_atomic_state_free() at the same time.
Imo we can do that as follow-ups as needed. Applied to topic/drm-misc,
thanks.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-03-30 14:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-30 11:05 [PATCH] drm/atomic: Don't try to free a NULL state Ander Conselvan de Oliveira
2015-03-30 11:35 ` David Weinehall
2015-03-30 14:52 ` Daniel Vetter [this message]
2015-03-30 14:33 ` shuang.he
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=20150330145243.GP23521@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=ander.conselvan.de.oliveira@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
/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