lkml.org 
[lkml]   [2006]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[Patch] Remove unnecessary check in drivers/pci/hotplug/pciehp_ctrl.c
From
Date
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;
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-09-25 00:59    [W:0.049 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site