Re: gadget: NULL pointer dereference

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/16/2011 04:52 PM, Sebastian Andrzej Siewior wrote:
* Yang Rui Rui | 2011-08-16 16:52:06 [+0800]:

On 08/16/2011 04:34 PM, Felipe Balbi wrote:
Hi,

On Tue, Aug 16, 2011 at 04:36:05PM +0800, Yang Rui Rui wrote:
Hi,

I got an oops with gadget CDC ethernet built-in. It is caused by
     see below code:
         switch (gadget->speed) {
         case USB_SPEED_SUPER:
                 descriptors = f->ss_descriptors;
                 break;
         case USB_SPEED_HIGH:
                 descriptors = f->hs_descriptors;
                 break;
         default:
         descriptors = f->descriptors;
         }
         #### oops here
         for (; *descriptors; ++descriptors) {
         ####
     gadget->speed = USB_SPEED_HIGH but f->hs_descriptor is NULL

I fix it by seting the speed as the speed of config functions.
This might be a temporary workaround for me, not sure if it is the
right fix.

So you are saying speed is HS but there are no HS descriptors around,
just FS?

Yes, just fullspped


Sebastian


--
Thanks
Yang Ruirui
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux