diff options
author | Maxim Osipov <maxim.osipov@gmail.com> | 2010-08-21 06:54:06 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-09-03 20:33:40 -0400 |
commit | 037d3656adbd7e8cb848f01cf5dec423ed76bbe7 (patch) | |
tree | be8a624843e7c7dd26c222fb1fd92951073d1be4 /drivers/usb | |
parent | 793f03aa7bda8f492e12ada3de711b4ad7f4d8d0 (diff) |
USB: Fix kernel oops with g_ether and Windows
Please find attached patch for
https://bugzilla.kernel.org/show_bug.cgi?id=16023 problem.
Signed-off-by: Maxim Osipov <maxim.osipov@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/rndis.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/usb/gadget/rndis.c b/drivers/usb/gadget/rndis.c index ee337f72c644..972d5ddd1e18 100644 --- a/drivers/usb/gadget/rndis.c +++ b/drivers/usb/gadget/rndis.c | |||
@@ -293,9 +293,13 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, | |||
293 | /* mandatory */ | 293 | /* mandatory */ |
294 | case OID_GEN_VENDOR_DESCRIPTION: | 294 | case OID_GEN_VENDOR_DESCRIPTION: |
295 | pr_debug("%s: OID_GEN_VENDOR_DESCRIPTION\n", __func__); | 295 | pr_debug("%s: OID_GEN_VENDOR_DESCRIPTION\n", __func__); |
296 | length = strlen (rndis_per_dev_params [configNr].vendorDescr); | 296 | if ( rndis_per_dev_params [configNr].vendorDescr ) { |
297 | memcpy (outbuf, | 297 | length = strlen (rndis_per_dev_params [configNr].vendorDescr); |
298 | rndis_per_dev_params [configNr].vendorDescr, length); | 298 | memcpy (outbuf, |
299 | rndis_per_dev_params [configNr].vendorDescr, length); | ||
300 | } else { | ||
301 | outbuf[0] = 0; | ||
302 | } | ||
299 | retval = 0; | 303 | retval = 0; |
300 | break; | 304 | break; |
301 | 305 | ||