提交 350649cc 编写于 作者: A Andrey Utkin 提交者: Mauro Carvalho Chehab

[media] tw5864-core: remove excessive irqsave

As warned by smatch:
	drivers/media/pci/tw5864/tw5864-core.c:160 tw5864_h264_isr() error: double lock 'irqsave:flags'
	drivers/media/pci/tw5864/tw5864-core.c:174 tw5864_h264_isr() error: double unlock 'irqsave:flags'

Two different spinlocks are obtained, so having two calls is correct,
but second irqsave is superfluous, and using same "flags" variable is
just wrong.
Reported-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: NAndrey Utkin <andrey.utkin@corp.bluecherry.net>
Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
上级 e5872251
......@@ -157,12 +157,12 @@ static void tw5864_h264_isr(struct tw5864_dev *dev)
cur_frame = next_frame;
spin_lock_irqsave(&input->slock, flags);
spin_lock(&input->slock);
input->frame_seqno++;
input->frame_gop_seqno++;
if (input->frame_gop_seqno >= input->gop)
input->frame_gop_seqno = 0;
spin_unlock_irqrestore(&input->slock, flags);
spin_unlock(&input->slock);
} else {
dev_err(&dev->pci->dev,
"Skipped frame on input %d because all buffers busy\n",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册