[PATCH] drm/mgag200: fix null pointer dereference

2012-07-07 Thread Devendra Naga
we are referencing the pointer after doing alloc_apertures, as alloc_apertures kzallocs, the kzalloc may fail and we get a NULL. so we need to check for NULL before we dereference this pointer Signed-off-by: Devendra Naga --- drivers/gpu/drm/mgag200/mgag200_drv.c |3 +++ 1 file changed, 3 i

[PATCH] drm/mgag200: fix null pointer dereference

2012-07-07 Thread Devendra Naga
we are referencing the pointer after doing alloc_apertures, as alloc_apertures kzallocs, the kzalloc may fail and we get a NULL. so we need to check for NULL before we dereference this pointer Signed-off-by: Devendra Naga --- drivers/gpu/drm/mgag200/mgag200_drv.c |3 +++ 1 file changed, 3 i