提交 88336e17 编写于 作者: M Max Kellermann 提交者: Mauro Carvalho Chehab

[media] media-devnode: add missing mutex lock in error handler

We should protect the device unregister patch too, at the error
condition.
Signed-off-by: NMax Kellermann <max@duempel.org>
Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
上级 952f8eef
......@@ -267,8 +267,11 @@ int __must_check media_devnode_register(struct media_devnode *mdev,
return 0;
error:
mutex_lock(&media_devnode_lock);
cdev_del(&mdev->cdev);
clear_bit(mdev->minor, media_devnode_nums);
mutex_unlock(&media_devnode_lock);
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册