diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-05-23 17:28:34 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-05-30 20:46:26 +0900 |
commit | aba12e3fccc79b8553a28a696e20859e3bfb1519 (patch) | |
tree | 6256a1ede73a99900b575343fec2601e8bb4dd23 | |
parent | 31de28ab35cfd955dbd3495378486df5769aed73 (diff) | |
download | blackbird-obmc-linux-aba12e3fccc79b8553a28a696e20859e3bfb1519.tar.gz blackbird-obmc-linux-aba12e3fccc79b8553a28a696e20859e3bfb1519.zip |
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: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/keucr/usb.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/staging/keucr/usb.c b/drivers/staging/keucr/usb.c index efadfcf64cbe..0608a5c6b2c0 100644 --- a/drivers/staging/keucr/usb.c +++ b/drivers/staging/keucr/usb.c @@ -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); |