summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2010-07-21 10:29:32 +1000
committerDave Airlie <airlied@redhat.com>2010-07-21 10:29:32 +1000
commitc42750b0261274107ae85c894c088e618a3e38b9 (patch)
tree30c3b5ddd9a05d07edbf95498ac44b668e2277d4
parente153b70b89770968a704eda0b55707c6066b2d44 (diff)
downloadblackbird-op-linux-c42750b0261274107ae85c894c088e618a3e38b9.tar.gz
blackbird-op-linux-c42750b0261274107ae85c894c088e618a3e38b9.zip
drm/r600: fix possible NULL pointer derefernce
Reported-by: Alexander Y. Fomichev <git.user@gmail.com> Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--drivers/gpu/drm/radeon/r600_blit.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/r600_blit.c b/drivers/gpu/drm/radeon/r600_blit.c
index f4fb88ece2bb..ca5c29f70779 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;
OpenPOWER on IntegriCloud