|
@@ -368,6 +368,14 @@ static int __ffs_ep0_queue_wait(struct ffs_data *ffs, char *data, size_t len)
|
|
|
req->buf = data;
|
|
|
req->length = len;
|
|
|
|
|
|
+ /*
|
|
|
+ * UDC layer requires to provide a buffer even for ZLP, but should
|
|
|
+ * not use it at all. Let's provide some poisoned pointer to catch
|
|
|
+ * possible bug in the driver.
|
|
|
+ */
|
|
|
+ if (req->buf == NULL)
|
|
|
+ req->buf = (void *)0xDEADBABE;
|
|
|
+
|
|
|
INIT_COMPLETION(ffs->ep0req_completion);
|
|
|
|
|
|
ret = usb_ep_queue(ffs->gadget->ep0, req, GFP_ATOMIC);
|