aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-05-29 11:30:51 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-05-31 06:54:21 -0400
commit377058707eed2be62bc200fbfa9db544dbe7d439 (patch)
tree535c89ba0ac792ae32dbd4e458b80baa69c06607
parent26d0b228b455862983c6e512eacdaae1374d8072 (diff)
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>
-rw-r--r--drivers/usb/host/uhci-hcd.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c
index f9c3947577fc..6218bfe54f52 100644
--- a/drivers/usb/host/uhci-hcd.c
+++ b/drivers/usb/host/uhci-hcd.c
@@ -590,14 +590,10 @@ static int uhci_start(struct usb_hcd *hcd)
590 init_waitqueue_head(&uhci->waitqh); 590 init_waitqueue_head(&uhci->waitqh);
591 591
592#ifdef UHCI_DEBUG_OPS 592#ifdef UHCI_DEBUG_OPS
593 dentry = debugfs_create_file(hcd->self.bus_name, 593 uhci->dentry = debugfs_create_file(hcd->self.bus_name,
594 S_IFREG|S_IRUGO|S_IWUSR, uhci_debugfs_root, 594 S_IFREG|S_IRUGO|S_IWUSR,
595 uhci, &uhci_debug_operations); 595 uhci_debugfs_root, uhci,
596 if (!dentry) { 596 &uhci_debug_operations);
597 dev_err(uhci_dev(uhci), "couldn't create uhci debugfs entry\n");
598 return -ENOMEM;
599 }
600 uhci->dentry = dentry;
601#endif 597#endif
602 598
603 uhci->frame = dma_zalloc_coherent(uhci_dev(uhci), 599 uhci->frame = dma_zalloc_coherent(uhci_dev(uhci),
@@ -882,8 +878,6 @@ static int __init uhci_hcd_init(void)
882 if (!errbuf) 878 if (!errbuf)
883 goto errbuf_failed; 879 goto errbuf_failed;
884 uhci_debugfs_root = debugfs_create_dir("uhci", usb_debug_root); 880 uhci_debugfs_root = debugfs_create_dir("uhci", usb_debug_root);
885 if (!uhci_debugfs_root)
886 goto debug_failed;
887#endif 881#endif
888 882
889 uhci_up_cachep = kmem_cache_create("uhci_urb_priv", 883 uhci_up_cachep = kmem_cache_create("uhci_urb_priv",
@@ -918,7 +912,6 @@ up_failed:
918#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) 912#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG)
919 debugfs_remove(uhci_debugfs_root); 913 debugfs_remove(uhci_debugfs_root);
920 914
921debug_failed:
922 kfree(errbuf); 915 kfree(errbuf);
923 916
924errbuf_failed: 917errbuf_failed: