usb: appledisplay: remove needless check before usb_free_coherent()
PATCH 1/1 usb: appledisplay: remove needless check before usb_free_coherent()
usb_free_coherent() is safe with NULL addr and this check is not required.
Signed-off-by Xu Wang <[email protected]>
--- drivers/usb/misc/appledisplay.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/usb/misc/appledisplay.c +1 -2
@@ -305,8 +305,7 @@ static int appledisplay_probe(struct usb_interface *iface,if (pdata->urb) {usb_kill_urb (pdata->urb);cancel_delayed_work_sync (&pdata->work); -if (pdata->urbdata) -usb_free_coherent (pdata->udev,ACD_URB_BUFFER_LEN , +usb_free_coherent (pdata->udev,ACD_URB_BUFFER_LEN , pdata->urbdata, pdata->urb->transfer_dma);usb_free_urb (pdata->urb); }
Signature · 1 line
2.17.1