Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 248d4903 authored by Frans Klaver's avatar Frans Klaver Committed by Darren Hart
Browse files

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: default avatarFrans Klaver <fransklaver@gmail.com>
Signed-off-by: default avatarDarren Hart <dvhart@linux.intel.com>
parent 98280374
Loading
Loading
Loading
Loading
+45 −44
Original line number Diff line number Diff line
@@ -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();