Merge "msm: kgsl: Detach context when context creation fails in create function"
diff --git a/drivers/gpu/msm/adreno_drawctxt.c b/drivers/gpu/msm/adreno_drawctxt.c
index e9d15b1..04164ad 100644
--- a/drivers/gpu/msm/adreno_drawctxt.c
+++ b/drivers/gpu/msm/adreno_drawctxt.c
@@ -471,7 +471,7 @@
return &drawctxt->base;
err:
- kgsl_context_put(&drawctxt->base);
+ kgsl_context_detach(&drawctxt->base);
return ERR_PTR(ret);
}
diff --git a/drivers/gpu/msm/kgsl_device.h b/drivers/gpu/msm/kgsl_device.h
index 4dcffcb..f2d0bed 100644
--- a/drivers/gpu/msm/kgsl_device.h
+++ b/drivers/gpu/msm/kgsl_device.h
@@ -540,6 +540,7 @@
int kgsl_context_init(struct kgsl_device_private *, struct kgsl_context
*context);
+int kgsl_context_detach(struct kgsl_context *context);
/**
* kgsl_context_put() - Release context reference count