[PATCH] pci hotplug: remove unnecessary tmp variable from pci_hp_register

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Here is a minor cleanup patch for pci_hotplug_core. This is
based on the feedback from ML I got when I posted some other
patches before.

Thanks,
Kenji Kaneshige


Remove unnecessary 'tmp' variable from pci_hp_register().

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@xxxxxxxxxxxxxx>

---
 drivers/pci/hotplug/pci_hotplug_core.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Index: 20080617/drivers/pci/hotplug/pci_hotplug_core.c
===================================================================
--- 20080617.orig/drivers/pci/hotplug/pci_hotplug_core.c
+++ 20080617/drivers/pci/hotplug/pci_hotplug_core.c
@@ -555,7 +555,6 @@ int pci_hp_register(struct hotplug_slot 
 {
 	int result;
 	struct pci_slot *pci_slot;
-	struct hotplug_slot *tmp;
 
 	if (slot == NULL)
 		return -ENODEV;
@@ -568,8 +567,7 @@ int pci_hp_register(struct hotplug_slot 
 	}
 
 	/* Check if we have already registered a slot with the same name. */
-	tmp = get_slot_from_name(slot->name);
-	if (tmp)
+	if (get_slot_from_name(slot->name))
 		return -EEXIST;
 
 	/*


--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux