Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pciehp: Remove unnecessary check in pciehp_ctrl.c

this was spotted by coverity (cid #819). We dereference p_slot
earlier in the function, and i found no way it could become NULL
anywhere.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Eric Sesterhenn and committed by
Greg Kroah-Hartman
9ef9977c dd5619cb

+1 -2
+1 -2
drivers/pci/hotplug/pciehp_ctrl.c
··· 797 797 p_slot->hpc_ops->get_latch_status(p_slot, &getstatus); 798 798 } 799 799 800 - if (p_slot) 801 - update_slot_info(p_slot); 800 + update_slot_info(p_slot); 802 801 803 802 mutex_unlock(&p_slot->ctrl->crit_sect); 804 803 return rc;