> > +/* gets the maximum power consumption */ > > +int langwell_udc_maxpower(int *mA) > > +{ > > + struct langwell_udc *dev = the_controller; > > + u32 usbmode, portsc1, usbcmd; > > + > > + /* fatal error */ > > + if (!dev) { > > + *mA = 0; > > + return -EINVAL; > > + } > > How could this ever happen? If the power layer asks about the power status before the USB controller is up and running. Which begs another question about locking I shall review. -- 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