On Thu, Nov 17, 2005 at 12:19:43PM -0500, Alan Stern wrote:
> On Thu, 17 Nov 2005, Greg KH wrote:
> 
> > > > +       fields = sscanf(buf, "%x %x", &idVendor, &idProduct);
> > > > +       if (fields < 0)
> > > > +               return -EINVAL;
> > > 
> > > Don't you want to test (fields < 2)?
> > 
> > No, it's ok to just specify the vendor, if you want a product of 0 :)
> > 
> > PCI does it this way too.
> 
> Well, in that case shouldn't you test (fields < 1)?

Yeah, good point.  I've also changed it to be < 2, as it doesn't really
make sense to have a product number of 0.

thanks,

greg k-h


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to