All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/atomic: Don't try to free a NULL state
@ 2015-03-30 11:05 Ander Conselvan de Oliveira
  2015-03-30 11:35 ` David Weinehall
  2015-03-30 14:33 ` shuang.he
  0 siblings, 2 replies; 4+ messages in thread
From: Ander Conselvan de Oliveira @ 2015-03-30 11:05 UTC (permalink / raw)
  To: dri-devel; +Cc: Ander Conselvan de Oliveira, intel-gfx

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);
-- 
2.1.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/atomic: Don't try to free a NULL state
  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
  2015-03-30 14:33 ` shuang.he
  1 sibling, 1 reply; 4+ messages in thread
From: David Weinehall @ 2015-03-30 11:35 UTC (permalink / raw)
  To: Ander Conselvan de Oliveira; +Cc: intel-gfx, dri-devel

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.


Regards, David Weinehall
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/atomic: Don't try to free a NULL state
  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:33 ` shuang.he
  1 sibling, 0 replies; 4+ messages in thread
From: shuang.he @ 2015-03-30 14:33 UTC (permalink / raw)
  To: shuang.he, ethan.gao, intel-gfx, ander.conselvan.de.oliveira

Tested-By: PRC QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com)
Task id: 6092
-------------------------------------Summary-------------------------------------
Platform          Delta          drm-intel-nightly          Series Applied
PNV                 -1              270/270              269/270
ILK                                  303/303              303/303
SNB                                  304/304              304/304
IVB                                  337/337              337/337
BYT                                  287/287              287/287
HSW                                  361/361              361/361
BDW                                  309/309              309/309
-------------------------------------Detailed-------------------------------------
Platform  Test                                drm-intel-nightly          Series Applied
 PNV  igt@gem_userptr_blits@coherency-sync      CRASH(3)PASS(2)      CRASH(2)
Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/atomic: Don't try to free a NULL state
  2015-03-30 11:35 ` David Weinehall
@ 2015-03-30 14:52   ` Daniel Vetter
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Vetter @ 2015-03-30 14:52 UTC (permalink / raw)
  To: Ander Conselvan de Oliveira, dri-devel, intel-gfx

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-03-30 14:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2015-03-30 14:33 ` shuang.he

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.