diff options
| author | Rafa Miecki <rafal@milecki.pl> | 2017-03-12 08:24:45 +0000 |
|---|---|---|
| committer | android-build-merger <android-build-merger@google.com> | 2017-03-12 08:24:45 +0000 |
| commit | 36f519a6bdb08ac111d5bf2f2d7ab443dc963a49 (patch) | |
| tree | 1f670eae4817cf373a166303b8044e9cd32bc159 | |
| parent | 3ff14c70fe58ce230d426c89f69075e86d9e82c0 (diff) | |
| parent | 79a7ff1443bd85c02786732080dff8d0696a0d11 (diff) | |
bcma: use (get|put)_device when probing/removing device driver
am: 79a7ff1443
Change-Id: I3356c2eb32abf2e6d9cfb2152642349caba5941b
| -rw-r--r-- | drivers/bcma/main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c index 59d8d0d14824..327f9e374b44 100644 --- a/drivers/bcma/main.c +++ b/drivers/bcma/main.c @@ -640,8 +640,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; } @@ -654,6 +657,7 @@ static int bcma_device_remove(struct device *dev) if (adrv->remove) adrv->remove(core); + put_device(dev); return 0; } |
