summaryrefslogtreecommitdiffstats
path: root/drivers/mcb/mcb-core.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--drivers/mcb/mcb-core.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mcb/mcb-core.c b/drivers/mcb/mcb-core.c
index 118d27ee3..7fd32b018 100644
--- a/drivers/mcb/mcb-core.c
+++ b/drivers/mcb/mcb-core.c
@@ -74,8 +74,10 @@ static int mcb_probe(struct device *dev)
get_device(dev);
ret = mdrv->probe(mdev, found_id);
- if (ret)
+ if (ret) {
module_put(carrier_mod);
+ put_device(dev);
+ }
return ret;
}