From: Alex Deucher Date: Wed, 21 Jul 2010 00:29:32 +0000 (+1000) Subject: drm/r600: fix possible NULL pointer derefernce X-Git-Tag: v2.6.35-rc6~2^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c42750b0261274107ae85c894c088e618a3e38b9;p=platform%2Fkernel%2Flinux-stable.git drm/r600: fix possible NULL pointer derefernce Reported-by: Alexander Y. Fomichev Signed-off-by: Alex Deucher Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/radeon/r600_blit.c b/drivers/gpu/drm/radeon/r600_blit.c index f4fb88e..ca5c29f 100644 --- a/drivers/gpu/drm/radeon/r600_blit.c +++ b/drivers/gpu/drm/radeon/r600_blit.c @@ -538,9 +538,12 @@ int r600_prepare_blit_copy(struct drm_device *dev, struct drm_file *file_priv) { drm_radeon_private_t *dev_priv = dev->dev_private; + int ret; DRM_DEBUG("\n"); - r600_nomm_get_vb(dev); + ret = r600_nomm_get_vb(dev); + if (ret) + return ret; dev_priv->blit_vb->file_priv = file_priv;