aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2011-03-22 03:15:21 -0400
committerDavid S. Miller <davem@davemloft.net>2011-03-23 17:10:36 -0400
commit88e87be6ba528bd73522ecf0468fe32f1ee199e6 (patch)
tree067a74277788f507679184b9902c4dc127f0be72 /drivers/net
parent35d48903e9781975e823b359ee85c257c9ff5c1c (diff)
drivers/net/ariadne.c: Convert release_resource to release_region/release_mem_region
Request_mem_region should be used with release_mem_region, not release_resource. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression x,E; @@ *x = request_mem_region(...) ... when != release_mem_region(x) when != x = E * release_resource(x); // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ariadne.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/ariadne.c b/drivers/net/ariadne.c
index 7ca0eded2561..b7f45cd756a2 100644
--- a/drivers/net/ariadne.c
+++ b/drivers/net/ariadne.c
@@ -182,14 +182,14 @@ static int __devinit ariadne_init_one(struct zorro_dev *z,
182 return -EBUSY; 182 return -EBUSY;
183 r2 = request_mem_region(mem_start, ARIADNE_RAM_SIZE, "RAM"); 183 r2 = request_mem_region(mem_start, ARIADNE_RAM_SIZE, "RAM");
184 if (!r2) { 184 if (!r2) {
185 release_resource(r1); 185 release_mem_region(base_addr, sizeof(struct Am79C960));
186 return -EBUSY; 186 return -EBUSY;
187 } 187 }
188 188
189 dev = alloc_etherdev(sizeof(struct ariadne_private)); 189 dev = alloc_etherdev(sizeof(struct ariadne_private));
190 if (dev == NULL) { 190 if (dev == NULL) {
191 release_resource(r1); 191 release_mem_region(base_addr, sizeof(struct Am79C960));
192 release_resource(r2); 192 release_mem_region(mem_start, ARIADNE_RAM_SIZE);
193 return -ENOMEM; 193 return -ENOMEM;
194 } 194 }
195 195
@@ -213,8 +213,8 @@ static int __devinit ariadne_init_one(struct zorro_dev *z,
213 213
214 err = register_netdev(dev); 214 err = register_netdev(dev);
215 if (err) { 215 if (err) {
216 release_resource(r1); 216 release_mem_region(base_addr, sizeof(struct Am79C960));
217 release_resource(r2); 217 release_mem_region(mem_start, ARIADNE_RAM_SIZE);
218 free_netdev(dev); 218 free_netdev(dev);
219 return err; 219 return err;
220 } 220 }