PNP: remove null pointer checks

Remove some null pointer checks.  Null pointers in these areas indicate
programming errors, and I think it's better to oops immediately rather
than return an error that is easily ignored.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Acked-by: Adam Belay <abelay@novell.com>
Signed-off-by: Len Brown <len.brown@intel.com>
这个提交包含在:
Bjorn Helgaas
2007-08-15 10:32:13 -06:00
提交者 Len Brown
父节点 4f0217e302
当前提交 b173491339
修改 5 个文件,包含 2 行新增60 行删除

查看文件

@@ -232,10 +232,6 @@ int pnp_add_id(struct pnp_id *id, struct pnp_dev *dev)
{
struct pnp_id *ptr;
if (!id)
return -EINVAL;
if (!dev)
return -EINVAL;
id->next = NULL;
ptr = dev->id;
while (ptr && ptr->next)