I'm seen too many cases of code like this (from core/hcd.c:hcd_alloc_dev):
if (!udev || udev->hcpriv) return -EINVAL; if (!udev->bus || !udev->bus->hcpriv) return -ENODEV;
with no explanation or comment about whether those tests are _ever_ supposed to fail, or what it would mean if they did.
Which is exactly why such lines were copied pretty much verbatim from the usb-ohci, usb-uhci, and/or uhci drivers... at least now, there's just one place to clean, not three or more! ;)
There are a lot of such "is it null" tests floating around, and reducing their volume (carefully, slowly) would be a Good Thing.
- Dave
------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel