diff options
author | Xu Wang <vulab@iscas.ac.cn> | 2020-07-20 08:24:56 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-07-21 14:41:58 +0300 |
commit | d8a849353c9c7710faa260a1fd11918d1f533e86 (patch) | |
tree | f083659946306ec99b0122790d2eee33d9404e22 /drivers/usb/misc/appledisplay.c | |
parent | ffeb1e9e897b8d36b197275592d121c96d3bdb95 (diff) | |
download | linux-d8a849353c9c7710faa260a1fd11918d1f533e86.tar.xz |
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 <vulab@iscas.ac.cn>
Link: https://lore.kernel.org/r/20200720052456.7610-1-vulab@iscas.ac.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/misc/appledisplay.c')
-rw-r--r-- | drivers/usb/misc/appledisplay.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/misc/appledisplay.c b/drivers/usb/misc/appledisplay.c index 91cfd917f6df..36fed1a09666 100644 --- a/drivers/usb/misc/appledisplay.c +++ b/drivers/usb/misc/appledisplay.c @@ -305,8 +305,7 @@ error: 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); } |