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>
这个提交包含在:
@@ -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)
|
||||
|
在新工单中引用
屏蔽一个用户