提交 485bdbb6 编写于 作者: M Mauro Carvalho Chehab

[media] tm6000: remove needless check

Smatch reports a warning:
	drivers/media/usb/tm6000/tm6000-video.c:646 tm6000_prepare_isoc() error: we previously assumed 'dev->urb_buffer' could be null (see line 624)

This is not really a problem, but it actually shows that the check
if urb_buffer is NULL is being done twice: at the if and at
tm6000_alloc_urb_buffers().

We don't need to do it twice. So, remove the extra check. The code
become cleaner, and, as a collateral effect, smatch becomes happy.
Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
上级 5cbe9f3a
......@@ -621,7 +621,7 @@ static int tm6000_prepare_isoc(struct tm6000_core *dev)
dev->isoc_in.maxsize, size);
if (!dev->urb_buffer && tm6000_alloc_urb_buffers(dev) < 0) {
if (tm6000_alloc_urb_buffers(dev) < 0) {
tm6000_err("cannot allocate memory for urb buffers\n");
/* call free, as some buffers might have been allocated */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册