mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 11:50:43 +09:00
bcma: use (get|put)_device when probing/removing device driver
am: 79a7ff1443
Change-Id: I3356c2eb32abf2e6d9cfb2152642349caba5941b
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user