On Tue, Oct 18, 2005 at 06:59:37PM -0700, Pete Zaitcev wrote:
> On Tue, 18 Oct 2005 17:25:40 -0700, Greg KH <[EMAIL PROTECTED]> wrote:
>
> Looks good to me, though usually, I do this like so:
>
> > @@ -329,6 +345,13 @@ static int __init mon_init(void)
> > }
> > // MOD_INC_USE_COUNT(which_module?);
> >
> > + if (usb_register_notify(&mon_nb) != 0) {
> > + printk(KERN_NOTICE TAG ": unable to register notify\n");
> > + debugfs_remove(mondir);
> > + usb_mon_deregister();
> > + return -ENODEV;
> > + }
>
> if ((rc = usb_register_notify(&mon_nb)) != 0) {
> printk(KERN_NOTICE TAG ": unable to register notify (%d)\n",
> rc);
> .....
> }
>
> You never know, the code may be useful, if to print anything at all.
I changed usb_register_notify() to not return anything at all, as
there's no way it can fail, which removed the need for this printk()
line.
thanks,
greg k-h
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel