summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@quicinc.com>2017-08-08 09:02:16 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2017-08-08 09:02:16 -0700
commitcb10479cfa3b94edd4d4bb62398660fe963f7400 (patch)
tree1c8210298c33263c5f2d15539f48981c9b810825 /drivers/gpu
parent0257f99a4d4d0d4abcb82dd873ceda446a9a8bba (diff)
parentb65ef4723782d7e5f75604ba17bf5dd6e41c1d57 (diff)
Merge "Merge android-4.4@59ff2e1 (v4.4.78) into msm-4.4"
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/virtio/virtgpu_object.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/virtio/virtgpu_object.c b/drivers/gpu/drm/virtio/virtgpu_object.c
index f300eba95bb1..1244cdf52859 100644
--- a/drivers/gpu/drm/virtio/virtgpu_object.c
+++ b/drivers/gpu/drm/virtio/virtgpu_object.c
@@ -81,8 +81,10 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev,
return -ENOMEM;
size = roundup(size, PAGE_SIZE);
ret = drm_gem_object_init(vgdev->ddev, &bo->gem_base, size);
- if (ret != 0)
+ if (ret != 0) {
+ kfree(bo);
return ret;
+ }
bo->dumb = false;
virtio_gpu_init_ttm_placement(bo, pinned);