eeepc-laptop: flatten control flow

In eeepc_rfkill_hotplug there's an if statement with a big tail that
ends right before the out_unlock label. We might as well invert the
condition and jump to out_unlock in that case, pretty much like the rest
of the code does. This removes an indentation level for a large chunk of
code and also stops suggesting there might be an else clause.

Signed-off-by: Frans Klaver <fransklaver@gmail.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
This commit is contained in:
Frans Klaver 2014-10-22 21:12:36 +02:00 committed by Darren Hart
parent 98280374ff
commit 248d490363

View File

@ -580,7 +580,9 @@ static void eeepc_rfkill_hotplug(struct eeepc_laptop *eeepc, acpi_handle handle)
mutex_lock(&eeepc->hotplug_lock);
pci_lock_rescan_remove();
if (eeepc->hotplug_slot) {
if (!eeepc->hotplug_slot)
goto out_unlock;
port = acpi_get_pci_dev(handle);
if (!port) {
pr_warning("Unable to find port\n");
@ -632,7 +634,6 @@ static void eeepc_rfkill_hotplug(struct eeepc_laptop *eeepc, acpi_handle handle)
}
out_put_dev:
pci_dev_put(port);
}
out_unlock:
pci_unlock_rescan_remove();