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

Commit 00395410 authored by Adrian Bunk's avatar Adrian Bunk Committed by Greg Kroah-Hartman
Browse files

PCI Hotplug: cpqhp_pushbutton_thread(): remove a pointless if() check



The Coverity checker spotted that we'd have already oops'ed if "ctrl"
was NULL.

Additionally, "func" had just been checked for not being NULL.

Signed-off-by: default avatarAdrian Bunk <bunk@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent d73460d7
Loading
Loading
Loading
Loading
+7 −9
Original line number Diff line number Diff line
@@ -1931,7 +1931,6 @@ void cpqhp_pushbutton_thread(unsigned long slot)
			return ;
		}

		if (func != NULL && ctrl != NULL) {
		if (cpqhp_process_SS(ctrl, func) != 0) {
			amber_LED_on(ctrl, hp_slot);
			green_LED_on(ctrl, hp_slot);
@@ -1941,7 +1940,6 @@ void cpqhp_pushbutton_thread(unsigned long slot)
			/* Wait for SOBS to be unset */
			wait_for_ctrl_irq(ctrl);
		}
		}

		p_slot->state = STATIC_STATE;
	} else {