]> git.baikalelectronics.ru Git - kernel.git/commitdiff
scsi: iscsi: Make iscsi_unregister_transport() return void
authorMax Gurtovoy <mgurtovoy@nvidia.com>
Thu, 16 Jun 2022 08:02:10 +0000 (11:02 +0300)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 17 Jun 2022 02:11:18 +0000 (22:11 -0400)
This function always returns 0. We can make it return void to simplify the
code. Also, no caller ever checks the return value of this function.

Link: https://lore.kernel.org/r/20220616080210.18531-1-mgurtovoy@nvidia.com
Reviewed-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Max Gurtovoy <mgurtovoy@nvidia.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi_transport_iscsi.c
include/scsi/scsi_transport_iscsi.h

index 2578db4c095d6bb5ad82a7218ba9ca1adcba1b8a..360e73ee29d5b8d6b86cbc2e2d0e8d167b2389c2 100644 (file)
@@ -4807,7 +4807,7 @@ free_priv:
 }
 EXPORT_SYMBOL_GPL(iscsi_register_transport);
 
-int iscsi_unregister_transport(struct iscsi_transport *tt)
+void iscsi_unregister_transport(struct iscsi_transport *tt)
 {
        struct iscsi_internal *priv;
        unsigned long flags;
@@ -4830,8 +4830,6 @@ int iscsi_unregister_transport(struct iscsi_transport *tt)
        sysfs_remove_group(&priv->dev.kobj, &iscsi_transport_group);
        device_unregister(&priv->dev);
        mutex_unlock(&rx_queue_mutex);
-
-       return 0;
 }
 EXPORT_SYMBOL_GPL(iscsi_unregister_transport);
 
index 9acb8422f68024cee9e70946b012541a460b38aa..695396a5f607a95b7bda39d099982156e6faf4ec 100644 (file)
@@ -162,7 +162,7 @@ struct iscsi_transport {
  * transport registration upcalls
  */
 extern struct scsi_transport_template *iscsi_register_transport(struct iscsi_transport *tt);
-extern int iscsi_unregister_transport(struct iscsi_transport *tt);
+extern void iscsi_unregister_transport(struct iscsi_transport *tt);
 
 /*
  * control plane upcalls