aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pnp/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pnp/core.c')
-rw-r--r--drivers/pnp/core.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/pnp/core.c b/drivers/pnp/core.c
index 61066fdb9e6d..d5964feb14de 100644
--- a/drivers/pnp/core.c
+++ b/drivers/pnp/core.c
@@ -52,9 +52,6 @@ int pnp_register_protocol(struct pnp_protocol *protocol)
52 int nodenum; 52 int nodenum;
53 struct list_head *pos; 53 struct list_head *pos;
54 54
55 if (!protocol)
56 return -EINVAL;
57
58 INIT_LIST_HEAD(&protocol->devices); 55 INIT_LIST_HEAD(&protocol->devices);
59 INIT_LIST_HEAD(&protocol->cards); 56 INIT_LIST_HEAD(&protocol->cards);
60 nodenum = 0; 57 nodenum = 0;
@@ -94,8 +91,6 @@ static void pnp_free_ids(struct pnp_dev *dev)
94 struct pnp_id *id; 91 struct pnp_id *id;
95 struct pnp_id *next; 92 struct pnp_id *next;
96 93
97 if (!dev)
98 return;
99 id = dev->id; 94 id = dev->id;
100 while (id) { 95 while (id) {
101 next = id->next; 96 next = id->next;
@@ -143,7 +138,7 @@ int __pnp_add_device(struct pnp_dev *dev)
143 */ 138 */
144int pnp_add_device(struct pnp_dev *dev) 139int pnp_add_device(struct pnp_dev *dev)
145{ 140{
146 if (!dev || !dev->protocol || dev->card) 141 if (dev->card)
147 return -EINVAL; 142 return -EINVAL;
148 dev->dev.parent = &dev->protocol->dev; 143 dev->dev.parent = &dev->protocol->dev;
149 sprintf(dev->dev.bus_id, "%02x:%02x", dev->protocol->number, 144 sprintf(dev->dev.bus_id, "%02x:%02x", dev->protocol->number,