git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
bcma: use (get|put)_device when probing/removing device driver
[pandora-kernel.git]
/
drivers
/
bcma
/
main.c
diff --git
a/drivers/bcma/main.c
b/drivers/bcma/main.c
index
7a987a7
..
94dd240
100644
(file)
--- a/
drivers/bcma/main.c
+++ b/
drivers/bcma/main.c
@@
-297,8
+297,11
@@
static int bcma_device_probe(struct device *dev)
drv);
int err = 0;
+ get_device(dev);
if (adrv->probe)
err = adrv->probe(core);
+ if (err)
+ put_device(dev);
return err;
}
@@
-311,6
+314,7
@@
static int bcma_device_remove(struct device *dev)
if (adrv->remove)
adrv->remove(core);
+ put_device(dev);
return 0;
}