]> asedeno.scripts.mit.edu Git - linux.git/commit
usb: misc: usbtest: fix error of urb allocation
authorChunfeng Yun <chunfeng.yun@mediatek.com>
Thu, 28 Apr 2016 03:42:21 +0000 (11:42 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Apr 2016 19:35:36 +0000 (12:35 -0700)
commit26186e5f2c1a6d1c244a3052f02e46ae29d823f2
treef11ffd2e06d3e622175e24893917af145ead163f
parentf5e6253fe6de35fc2fa059974dbd9d61f32e4cd0
usb: misc: usbtest: fix error of urb allocation

urb allocation will fail when usbtest_alloc_urb() tries to
allocate zero length buffer, but it doesn't need it in fact,
so just skips buffer allocation in the case.

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/misc/usbtest.c