Merge "msm: kgsl: Add check not to decrement refcount when debug_fs is disabled"

This commit is contained in:
qctecmdr 2020-04-28 13:12:19 -07:00 • committed by Gerrit - the friendly Code Review server
commit f69d3db037
2 changed files with 5 additions and 2 deletions

View file

@ -1299,7 +1299,9 @@ void adreno_context_debugfs_init(struct adreno_device *adreno_dev,
static inline void adreno_debugfs_init(struct adreno_device *adreno_dev) { }
static inline void adreno_context_debugfs_init(struct adreno_device *device,
struct adreno_context *context)
{ }
{
context->debug_root = NULL;
}
#endif
/**

View file

@ -464,7 +464,8 @@ void adreno_drawctxt_detach(struct kgsl_context *context)
debugfs_remove_recursive(drawctxt->debug_root);
/* The debugfs file has a reference, release it */
kgsl_context_put(context);
if (drawctxt->debug_root)
kgsl_context_put(context);
/*
* internal_timestamp is set in adreno_ringbuffer_addcmds,