From: Wei Yongjun Date: Wed, 20 Mar 2013 14:30:46 +0000 (-0300) Subject: [media] gspca: remove needless check before usb_free_coherent() X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=8b2c3da108b08751ac65911e1797ef9a5342c727;p=openwrt%2Fstaging%2Fblogic.git [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 Signed-off-by: Mauro Carvalho Chehab --- 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) gspca_dev->urb[i] = NULL; usb_kill_urb(urb); - if (urb->transfer_buffer != NULL) - usb_free_coherent(gspca_dev->dev, - urb->transfer_buffer_length, - urb->transfer_buffer, - urb->transfer_dma); + usb_free_coherent(gspca_dev->dev, + urb->transfer_buffer_length, + urb->transfer_buffer, + urb->transfer_dma); usb_free_urb(urb); } }