Quirk for a USB mass storage device

Pawel Jakub Dawidek pjd at FreeBSD.org
Tue Nov 1 12:16:26 UTC 2011


On Sun, Oct 30, 2011 at 09:15:40PM +0100, Hans Petter Selasky wrote:
> On Saturday 29 October 2011 20:38:07 Pawel Jakub Dawidek wrote:
> > > +     err = usbd_do_request(udev, NULL, &req, &buf);
> > > +     if (err)
> > > +             buf = 0;
> > > +
> > > +     return (buf);
> > > +}
> > 
> > You could drop 'err' variable and just check function return directly.
> > There is only one extra empty line at the begining of the function.
> 
> No, because there is &buf.

How about:

	if (usbd_do_request(udev, NULL, &req, &buf) != 0)
		buf = 0;

	return (buf);

> I'll add your device to the device quirk list.

Ok. How come did it work in the past? I don't think that my device was
removed from the quirk list by accident? May other, similar devices not
work as well with the current code?

-- 
Pawel Jakub Dawidek                       http://www.wheelsystems.com
FreeBSD committer                         http://www.FreeBSD.org
Am I Evil? Yes, I Am!                     http://yomoli.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-usb/attachments/20111101/ffbd2b30/attachment.pgp


More information about the freebsd-usb mailing list