Commit d8a84935 authored by Xu Wang's avatar Xu Wang Committed by Greg Kroah-Hartman

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: default avatarXu Wang <vulab@iscas.ac.cn>
Link: https://lore.kernel.org/r/20200720052456.7610-1-vulab@iscas.ac.cnSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ffeb1e9e
...@@ -305,8 +305,7 @@ static int appledisplay_probe(struct usb_interface *iface, ...@@ -305,8 +305,7 @@ static int appledisplay_probe(struct usb_interface *iface,
if (pdata->urb) { if (pdata->urb) {
usb_kill_urb(pdata->urb); usb_kill_urb(pdata->urb);
cancel_delayed_work_sync(&pdata->work); 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); pdata->urbdata, pdata->urb->transfer_dma);
usb_free_urb(pdata->urb); usb_free_urb(pdata->urb);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment