summaryrefslogtreecommitdiffstats
path: root/drivers/pnp/driver.c
diff options
context:
space:
mode:
authorBjorn Helgaas2007-08-15 18:32:13 +0200
committerLen Brown2007-08-24 07:27:24 +0200
commitb173491339b9ae7f1322241ce6228c1268513a39 (patch)
treedca8b3a7021d7957d60023e34ac96a9df5215421 /drivers/pnp/driver.c
parentPNP: remove MODULE infrastructure (diff)
downloadkernel-qcow2-linux-b173491339b9ae7f1322241ce6228c1268513a39.tar.gz
kernel-qcow2-linux-b173491339b9ae7f1322241ce6228c1268513a39.tar.xz
kernel-qcow2-linux-b173491339b9ae7f1322241ce6228c1268513a39.zip
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 9be01b0433b9..2fa64a6b25c8 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)
{
struct pnp_id *ptr;
- if (!id)
- return -EINVAL;
- if (!dev)
- return -EINVAL;
id->next = NULL;
ptr = dev->id;
while (ptr && ptr->next)