Skip to content

Commit

Permalink
pciehp: Remove unnecessary check in pciehp_ctrl.c
Browse files Browse the repository at this point in the history
this was spotted by coverity (cid torvalds#819). We dereference p_slot
earlier in the function, and i found no way it could become NULL
anywhere.

Signed-off-by: Eric Sesterhenn <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
SesterhennEric authored and gregkh committed Oct 18, 2006
1 parent dd5619c commit 9ef9977
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/pci/hotplug/pciehp_ctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -797,8 +797,7 @@ int pciehp_enable_slot(struct slot *p_slot)
p_slot->hpc_ops->get_latch_status(p_slot, &getstatus);
}

if (p_slot)
update_slot_info(p_slot);
update_slot_info(p_slot);

mutex_unlock(&p_slot->ctrl->crit_sect);
return rc;
Expand Down

0 comments on commit 9ef9977

Please sign in to comment.