diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2015-02-03 18:36:35 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-03-02 18:53:27 +0100 |
commit | 704b3f4c11e0b1265a41472b6b25dd9e3d205674 (patch) | |
tree | 559b9fd213f390e00f8dad5e47368a04d597369b /drivers/media/usb/stkwebcam/stk-webcam.c | |
parent | [media] vivid sdr: fix broken sine tone generated for sdr FM (diff) | |
download | linux-704b3f4c11e0b1265a41472b6b25dd9e3d205674.tar.xz linux-704b3f4c11e0b1265a41472b6b25dd9e3d205674.zip |
[media] stk-webcam: Delete an unnecessary check before the function call "vfree"
The vfree() function performs also input parameter validation.
Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to '')
-rw-r--r-- | drivers/media/usb/stkwebcam/stk-webcam.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/media/usb/stkwebcam/stk-webcam.c b/drivers/media/usb/stkwebcam/stk-webcam.c index e08fa587332f..c21c4c004f97 100644 --- a/drivers/media/usb/stkwebcam/stk-webcam.c +++ b/drivers/media/usb/stkwebcam/stk-webcam.c @@ -556,10 +556,8 @@ static int stk_free_sio_buffers(struct stk_camera *dev) nbufs = dev->n_sbufs; dev->n_sbufs = 0; spin_unlock_irqrestore(&dev->spinlock, flags); - for (i = 0; i < nbufs; i++) { - if (dev->sio_bufs[i].buffer != NULL) - vfree(dev->sio_bufs[i].buffer); - } + for (i = 0; i < nbufs; i++) + vfree(dev->sio_bufs[i].buffer); kfree(dev->sio_bufs); dev->sio_bufs = NULL; return 0; |