mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
[media] media-entity: only call dev_dbg_obj if mdev is not NULL
Fix kernel Oops NULL pointer deference Call dev_dbg_obj only after checking if gobj->mdev is not NULL Signed-off-by: Helen Koike <helen.koike@collabora.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
parent
242b0c4cc9
commit
8d1d3d004c
1 changed files with 2 additions and 2 deletions
|
|
@ -199,12 +199,12 @@ void media_gobj_create(struct media_device *mdev,
|
|||
|
||||
void media_gobj_destroy(struct media_gobj *gobj)
|
||||
{
|
||||
dev_dbg_obj(__func__, gobj);
|
||||
|
||||
/* Do nothing if the object is not linked. */
|
||||
if (gobj->mdev == NULL)
|
||||
return;
|
||||
|
||||
dev_dbg_obj(__func__, gobj);
|
||||
|
||||
gobj->mdev->topology_version++;
|
||||
|
||||
/* Remove the object from mdev list */
|
||||
|
|
|
|||
Loading…
Reference in a new issue