On Fri, 15 Nov 2013 oliver@xxxxxxxxxx wrote: > From: Oliver Neukum <oneukum@xxxxxxx> > > To allow a full switch to dynamic debugging make the > debug parameter conditional on defined(DEBUF) || defined(CONFIG_DYNAMIC_DEBUG) > > Signed-off-by: Oliver Neukum <oneukum@xxxxxxx> > @@ -868,14 +870,14 @@ static int __init uhci_hcd_init(void) > ignore_oc ? ", overcurrent ignored" : ""); > set_bit(USB_UHCI_LOADED, &usb_hcds_loaded); > > - if (DEBUG_CONFIGURED) { > - errbuf = kmalloc(ERRBUF_LEN, GFP_KERNEL); > - if (!errbuf) > - goto errbuf_failed; > - uhci_debugfs_root = debugfs_create_dir("uhci", usb_debug_root); > - if (!uhci_debugfs_root) > - goto debug_failed; > - } > +#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) > + errbuf = kmalloc(ERRBUF_LEN, GFP_KERNEL); > + if (!errbuf) > + goto errbuf_failed; > +#endif > + uhci_debugfs_root = debugfs_create_dir("uhci", usb_debug_root); > + if (!uhci_debugfs_root) > + goto debug_failed; You might as well keep uhci_debugfs_root inside the conditional code. If debugging isn't enabled, it won't be used for anything. > @@ -927,7 +931,9 @@ static void __exit uhci_hcd_cleanup(void) > #endif > kmem_cache_destroy(uhci_up_cachep); > debugfs_remove(uhci_debugfs_root); > +#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) > kfree(errbuf); > +#endif And here too, obviously. Alan Stern -- 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