Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

USB: uhci: no need to check return value of debugfs_create functions

When calling debugfs functions, there is no need to ever check the
return value. The function can work or not, but the code logic should
never do something different based on this.

Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

+4 -11
+4 -11
drivers/usb/host/uhci-hcd.c
··· 590 590 init_waitqueue_head(&uhci->waitqh); 591 591 592 592 #ifdef UHCI_DEBUG_OPS 593 - dentry = debugfs_create_file(hcd->self.bus_name, 594 - S_IFREG|S_IRUGO|S_IWUSR, uhci_debugfs_root, 595 - uhci, &uhci_debug_operations); 596 - if (!dentry) { 597 - dev_err(uhci_dev(uhci), "couldn't create uhci debugfs entry\n"); 598 - return -ENOMEM; 599 - } 600 - uhci->dentry = dentry; 593 + uhci->dentry = debugfs_create_file(hcd->self.bus_name, 594 + S_IFREG|S_IRUGO|S_IWUSR, 595 + uhci_debugfs_root, uhci, 596 + &uhci_debug_operations); 601 597 #endif 602 598 603 599 uhci->frame = dma_zalloc_coherent(uhci_dev(uhci), ··· 878 882 if (!errbuf) 879 883 goto errbuf_failed; 880 884 uhci_debugfs_root = debugfs_create_dir("uhci", usb_debug_root); 881 - if (!uhci_debugfs_root) 882 - goto debug_failed; 883 885 #endif 884 886 885 887 uhci_up_cachep = kmem_cache_create("uhci_urb_priv", ··· 912 918 #if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) 913 919 debugfs_remove(uhci_debugfs_root); 914 920 915 - debug_failed: 916 921 kfree(errbuf); 917 922 918 923 errbuf_failed: