diff options
Diffstat (limited to 'net/atm/resources.c')
-rw-r--r-- | net/atm/resources.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/net/atm/resources.c b/net/atm/resources.c index 33f1685dbb77..a57a9268bd24 100644 --- a/net/atm/resources.c +++ b/net/atm/resources.c | |||
@@ -44,11 +44,6 @@ static struct atm_dev *__alloc_atm_dev(const char *type) | |||
44 | return dev; | 44 | return dev; |
45 | } | 45 | } |
46 | 46 | ||
47 | static void __free_atm_dev(struct atm_dev *dev) | ||
48 | { | ||
49 | kfree(dev); | ||
50 | } | ||
51 | |||
52 | static struct atm_dev *__atm_dev_lookup(int number) | 47 | static struct atm_dev *__atm_dev_lookup(int number) |
53 | { | 48 | { |
54 | struct atm_dev *dev; | 49 | struct atm_dev *dev; |
@@ -90,7 +85,7 @@ struct atm_dev *atm_dev_register(const char *type, const struct atmdev_ops *ops, | |||
90 | if ((inuse = __atm_dev_lookup(number))) { | 85 | if ((inuse = __atm_dev_lookup(number))) { |
91 | atm_dev_put(inuse); | 86 | atm_dev_put(inuse); |
92 | spin_unlock(&atm_dev_lock); | 87 | spin_unlock(&atm_dev_lock); |
93 | __free_atm_dev(dev); | 88 | kfree(dev); |
94 | return NULL; | 89 | return NULL; |
95 | } | 90 | } |
96 | dev->number = number; | 91 | dev->number = number; |
@@ -119,7 +114,7 @@ struct atm_dev *atm_dev_register(const char *type, const struct atmdev_ops *ops, | |||
119 | spin_lock(&atm_dev_lock); | 114 | spin_lock(&atm_dev_lock); |
120 | list_del(&dev->dev_list); | 115 | list_del(&dev->dev_list); |
121 | spin_unlock(&atm_dev_lock); | 116 | spin_unlock(&atm_dev_lock); |
122 | __free_atm_dev(dev); | 117 | kfree(dev); |
123 | return NULL; | 118 | return NULL; |
124 | } | 119 | } |
125 | 120 | ||
@@ -148,7 +143,7 @@ void atm_dev_deregister(struct atm_dev *dev) | |||
148 | } | 143 | } |
149 | } | 144 | } |
150 | 145 | ||
151 | __free_atm_dev(dev); | 146 | kfree(dev); |
152 | } | 147 | } |
153 | 148 | ||
154 | void shutdown_atm_dev(struct atm_dev *dev) | 149 | void shutdown_atm_dev(struct atm_dev *dev) |