Commit 07758747 authored by Wei Yongjun's avatar Wei Yongjun Committed by Mauro Carvalho Chehab

media: platform: Fix missing spin_lock_init()

The driver allocates the spinlock but not initialize it.
Use spin_lock_init() on it to initialize it correctly.

This is detected by Coccinelle semantic patch.

Fixes: d2b4387f ("media: platform: Add Aspeed Video Engine driver")
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 3eefa620
...@@ -1661,6 +1661,7 @@ static int aspeed_video_probe(struct platform_device *pdev) ...@@ -1661,6 +1661,7 @@ static int aspeed_video_probe(struct platform_device *pdev)
video->frame_rate = 30; video->frame_rate = 30;
video->dev = &pdev->dev; video->dev = &pdev->dev;
spin_lock_init(&video->lock);
mutex_init(&video->video_lock); mutex_init(&video->video_lock);
init_waitqueue_head(&video->wait); init_waitqueue_head(&video->wait);
INIT_DELAYED_WORK(&video->res_work, aspeed_video_resolution_work); INIT_DELAYED_WORK(&video->res_work, aspeed_video_resolution_work);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment