Commit aba12e3f authored by Wei Yongjun's avatar Wei Yongjun Committed by Greg Kroah-Hartman

staging: keucr: 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 avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 31de28ab
......@@ -442,12 +442,9 @@ static void dissociate_dev(struct us_data *us)
kfree(us->sensebuf);
/* Free the device-related DMA-mapped buffers */
if (us->cr)
usb_free_coherent(us->pusb_dev, sizeof(*us->cr), us->cr,
us->cr_dma);
if (us->iobuf)
usb_free_coherent(us->pusb_dev, US_IOBUF_SIZE, us->iobuf,
us->iobuf_dma);
usb_free_coherent(us->pusb_dev, sizeof(*us->cr), us->cr, us->cr_dma);
usb_free_coherent(us->pusb_dev, US_IOBUF_SIZE, us->iobuf,
us->iobuf_dma);
/* Remove our private data from the interface */
usb_set_intfdata(us->pusb_intf, NULL);
......
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