Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=00395410885cac96015850426bf697423a3ec9dc Commit: 00395410885cac96015850426bf697423a3ec9dc Parent: d73460d79bc88de74221d73723ed61a0081b7a36 Author: Adrian Bunk <[EMAIL PROTECTED]> AuthorDate: Wed Oct 24 18:25:00 2007 +0200 Committer: Greg Kroah-Hartman <[EMAIL PROTECTED]> CommitDate: Mon Nov 5 13:35:17 2007 -0800
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: Adrian Bunk <[EMAIL PROTECTED]> Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]> --- drivers/pci/hotplug/cpqphp_ctrl.c | 16 +++++++--------- 1 files changed, 7 insertions(+), 9 deletions(-) diff --git a/drivers/pci/hotplug/cpqphp_ctrl.c b/drivers/pci/hotplug/cpqphp_ctrl.c index 3ef0a48..856d57b 100644 --- a/drivers/pci/hotplug/cpqphp_ctrl.c +++ b/drivers/pci/hotplug/cpqphp_ctrl.c @@ -1931,16 +1931,14 @@ 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); - - set_SOGO(ctrl); + if (cpqhp_process_SS(ctrl, func) != 0) { + amber_LED_on(ctrl, hp_slot); + green_LED_on(ctrl, hp_slot); - /* Wait for SOBS to be unset */ - wait_for_ctrl_irq (ctrl); - } + set_SOGO(ctrl); + + /* Wait for SOBS to be unset */ + wait_for_ctrl_irq(ctrl); } p_slot->state = STATIC_STATE; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html