scsi: bfa: no need to check return value of debugfs_create functions
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 Jan 2019 15:09:00 +0000 (16:09 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 29 Jan 2019 05:40:40 +0000 (00:40 -0500)
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.

[mkp: removed unused label]

Cc: Anil Gurumurthy <anil.gurumurthy@qlogic.com>
Cc: Sudarsana Kalluru <sudarsana.kalluru@qlogic.com>
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/bfa/bfad_debugfs.c

index 349cfe7..bfcd87c 100644 (file)
@@ -460,11 +460,6 @@ bfad_debugfs_init(struct bfad_port_s *port)
        if (!bfa_debugfs_root) {
                bfa_debugfs_root = debugfs_create_dir("bfa", NULL);
                atomic_set(&bfa_debugfs_port_count, 0);
-               if (!bfa_debugfs_root) {
-                       printk(KERN_WARNING
-                               "BFA debugfs root dir creation failed\n");
-                       goto err;
-               }
        }
 
        /* Setup the pci_dev debugfs directory for the port */
@@ -472,12 +467,6 @@ bfad_debugfs_init(struct bfad_port_s *port)
        if (!port->port_debugfs_root) {
                port->port_debugfs_root =
                        debugfs_create_dir(name, bfa_debugfs_root);
-               if (!port->port_debugfs_root) {
-                       printk(KERN_WARNING
-                               "bfa %s: debugfs root creation failed\n",
-                               bfad->pci_name);
-                       goto err;
-               }
 
                atomic_inc(&bfa_debugfs_port_count);
 
@@ -489,16 +478,9 @@ bfad_debugfs_init(struct bfad_port_s *port)
                                                        port->port_debugfs_root,
                                                        port,
                                                        file->fops);
-                       if (!bfad->bfad_dentry_files[i]) {
-                               printk(KERN_WARNING
-                                       "bfa %s: debugfs %s creation failed\n",
-                                       bfad->pci_name, file->name);
-                               goto err;
-                       }
                }
        }
 
-err:
        return;
 }