USB: gadget: f_fs: even zero-length packets require a buffer
commitce1fd3585709e833ad102167024e97217734dbfd
authorMarek Szyprowski <m.szyprowski@samsung.com>
Fri, 28 Jan 2011 12:55:36 +0000 (28 13:55 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 4 Feb 2011 19:57:22 +0000 (4 11:57 -0800)
tree4d87314cc66c9631ae0cae5e7d48c84dee5b07b3
parent9a1b2e64020d41c577881952734fecd114af75f1
USB: gadget: f_fs: even zero-length packets require a buffer

Some UDC drivers fails to queue a request if req->buf == NULL even for
ZLP requests. This patch adds a poisoned pointer instead of NULL to
make the code compliant with the gadget specification and catches
possible bug in the UDC driver if it tries to dereference buffer pointer
on ZLP request.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/f_fs.c