|
@@ -592,8 +592,9 @@ ehci_submit_async(struct usb_device *dev, unsigned long pipe, void *buffer,
|
|
|
* dangerous operation, it's responsibility of the calling
|
|
|
* code to make sure enough space is reserved.
|
|
|
*/
|
|
|
- invalidate_dcache_range((unsigned long)buffer,
|
|
|
- ALIGN((unsigned long)buffer + length, ARCH_DMA_MINALIGN));
|
|
|
+ if (buffer != NULL && length > 0)
|
|
|
+ invalidate_dcache_range((unsigned long)buffer,
|
|
|
+ ALIGN((unsigned long)buffer + length, ARCH_DMA_MINALIGN));
|
|
|
|
|
|
/* Check that the TD processing happened */
|
|
|
if (QT_TOKEN_GET_STATUS(token) & QT_TOKEN_STATUS_ACTIVE)
|