projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
drm/etnaviv: add clock gating workaround for GC7000 r6202
[linux-2.6-microblaze.git]
/
drivers
/
gpu
/
drm
/
drm_dp_aux_dev.c
diff --git
a/drivers/gpu/drm/drm_dp_aux_dev.c
b/drivers/gpu/drm/drm_dp_aux_dev.c
index
e25181b
..
06b374c
100644
(file)
--- a/
drivers/gpu/drm/drm_dp_aux_dev.c
+++ b/
drivers/gpu/drm/drm_dp_aux_dev.c
@@
-278,6
+278,12
@@
void drm_dp_aux_unregister_devnode(struct drm_dp_aux *aux)
if (!aux_dev) /* attach must have failed */
return;
if (!aux_dev) /* attach must have failed */
return;
+ /*
+ * As some AUX adapters may exist as platform devices which outlive their respective DRM
+ * devices, we clear drm_dev to ensure that we never accidentally reference a stale pointer
+ */
+ aux->drm_dev = NULL;
+
mutex_lock(&aux_idr_mutex);
idr_remove(&aux_idr, aux_dev->index);
mutex_unlock(&aux_idr_mutex);
mutex_lock(&aux_idr_mutex);
idr_remove(&aux_idr, aux_dev->index);
mutex_unlock(&aux_idr_mutex);