summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2018-12-17 07:14:35 -0500
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-01-07 13:54:01 -0500
commit07758747a2d7963593421b4e782b0f20a80f58d3 (patch)
treef79fbd8c0e24bff3538980e771f88351b6966533 /drivers
parent3eefa620d08dc6aa9323e409f1a307783c528004 (diff)
downloadlinux-07758747a2d7963593421b4e782b0f20a80f58d3.tar.bz2
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: d2b4387f3bdf ("media: platform: Add Aspeed Video Engine driver") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/platform/aspeed-video.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/platform/aspeed-video.c b/drivers/media/platform/aspeed-video.c
index dfec813f50a9..692e08ef38c0 100644
--- a/drivers/media/platform/aspeed-video.c
+++ b/drivers/media/platform/aspeed-video.c
@@ -1661,6 +1661,7 @@ static int aspeed_video_probe(struct platform_device *pdev)
video->frame_rate = 30;
video->dev = &pdev->dev;
+ spin_lock_init(&video->lock);
mutex_init(&video->video_lock);
init_waitqueue_head(&video->wait);
INIT_DELAYED_WORK(&video->res_work, aspeed_video_resolution_work);