aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pnp/driver.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2007-08-15 12:32:13 -0400
committerLen Brown <len.brown@intel.com>2007-08-24 01:27:24 -0400
commitb173491339b9ae7f1322241ce6228c1268513a39 (patch)
treedca8b3a7021d7957d60023e34ac96a9df5215421 /drivers/pnp/driver.c
parent4f0217e30249ac0eb13b65ef64f2aee627465da2 (diff)
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>
Diffstat (limited to 'drivers/pnp/driver.c')
-rw-r--r--drivers/pnp/driver.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/pnp/driver.c b/drivers/pnp/driver.c
index 9be01b0433b..2fa64a6b25c 100644
--- a/drivers/pnp/driver.c
+++ b/drivers/pnp/driver.c
@@ -232,10 +232,6 @@ int pnp_add_id(struct pnp_id *id, struct pnp_dev *dev)
232{ 232{
233 struct pnp_id *ptr; 233 struct pnp_id *ptr;
234 234
235 if (!id)
236 return -EINVAL;
237 if (!dev)
238 return -EINVAL;
239 id->next = NULL; 235 id->next = NULL;
240 ptr = dev->id; 236 ptr = dev->id;
241 while (ptr && ptr->next) 237 while (ptr && ptr->next)