mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [Patch] Remove unnecessary check in drivers/pci/hotplug/pciehp_ctrl.c
@ 2006-09-24 22:56 Eric Sesterhenn
  0 siblings, 0 replies; only message in thread
From: Eric Sesterhenn @ 2006-09-24 22:56 UTC (permalink / raw)
  To: linux-kernel

hi,

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>

--- linux-2.6.18-git3/drivers/pci/hotplug/pciehp_ctrl.c.orig	2006-09-24 22:19:11.000000000 +0200
+++ linux-2.6.18-git3/drivers/pci/hotplug/pciehp_ctrl.c	2006-09-24 22:25:10.000000000 +0200
@@ -790,8 +790,7 @@ int pciehp_enable_slot(struct slot *p_sl
 		p_slot->hpc_ops->get_latch_status(p_slot, &getstatus);
 	}
 
-	if (p_slot)
-		update_slot_info(p_slot);
+	update_slot_info(p_slot);
 
 	return rc;
 }



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-09-24 22:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-24 22:56 [Patch] Remove unnecessary check in drivers/pci/hotplug/pciehp_ctrl.c Eric Sesterhenn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome