diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-03-20 10:30:46 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-23 09:48:56 -0400 |
commit | 8b2c3da108b08751ac65911e1797ef9a5342c727 (patch) | |
tree | da45d67b2e1d2ab41d220f6093ac37767dc5e5e6 /drivers/media/usb/gspca | |
parent | a3ad56d0aba738298338895b937359d57f40438b (diff) |
[media] gspca: remove needless check before usb_free_coherent()
usb_free_coherent() is safe with NULL addr and this check is
not required.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/usb/gspca')
-rw-r--r-- | drivers/media/usb/gspca/gspca.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/media/usb/gspca/gspca.c b/drivers/media/usb/gspca/gspca.c index 5800d65f9144..924e032461d0 100644 --- a/drivers/media/usb/gspca/gspca.c +++ b/drivers/media/usb/gspca/gspca.c | |||
@@ -567,11 +567,10 @@ static void destroy_urbs(struct gspca_dev *gspca_dev) | |||
567 | 567 | ||
568 | gspca_dev->urb[i] = NULL; | 568 | gspca_dev->urb[i] = NULL; |
569 | usb_kill_urb(urb); | 569 | usb_kill_urb(urb); |
570 | if (urb->transfer_buffer != NULL) | 570 | usb_free_coherent(gspca_dev->dev, |
571 | usb_free_coherent(gspca_dev->dev, | 571 | urb->transfer_buffer_length, |
572 | urb->transfer_buffer_length, | 572 | urb->transfer_buffer, |
573 | urb->transfer_buffer, | 573 | urb->transfer_dma); |
574 | urb->transfer_dma); | ||
575 | usb_free_urb(urb); | 574 | usb_free_urb(urb); |
576 | } | 575 | } |
577 | } | 576 | } |