diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-06-05 09:33:44 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-06-05 11:26:37 -0300 |
commit | 485bdbb6b83309505654379153d55746d5996917 (patch) | |
tree | a07872bf874e190d0d48ff8dedc1e94be22e734e /drivers/media/usb/tm6000/tm6000-video.c | |
parent | 5cbe9f3acffb9fd16391b5abf16f947c7d7833da (diff) | |
download | talos-op-linux-485bdbb6b83309505654379153d55746d5996917.tar.gz talos-op-linux-485bdbb6b83309505654379153d55746d5996917.zip |
[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: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/usb/tm6000/tm6000-video.c')
-rw-r--r-- | drivers/media/usb/tm6000/tm6000-video.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/usb/tm6000/tm6000-video.c b/drivers/media/usb/tm6000/tm6000-video.c index 77ce9efe1f24..5287d2960282 100644 --- a/drivers/media/usb/tm6000/tm6000-video.c +++ b/drivers/media/usb/tm6000/tm6000-video.c @@ -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 */ |