Merge branch 'for-linus' of git://opensource.wolfsonmicro.com/regmap
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 8 Sep 2011 23:47:52 +0000 (16:47 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 8 Sep 2011 23:47:52 +0000 (16:47 -0700)
* 'for-linus' of git://opensource.wolfsonmicro.com/regmap:
  regmap: Remove bitrotted module_put()s

drivers/base/regmap/regmap.c

index 0eef4da..20663f8 100644 (file)
@@ -168,13 +168,11 @@ struct regmap *regmap_init(struct device *dev,
        map->work_buf = kmalloc(map->format.buf_size, GFP_KERNEL);
        if (map->work_buf == NULL) {
                ret = -ENOMEM;
-               goto err_bus;
+               goto err_map;
        }
 
        return map;
 
-err_bus:
-       module_put(map->bus->owner);
 err_map:
        kfree(map);
 err:
@@ -188,7 +186,6 @@ EXPORT_SYMBOL_GPL(regmap_init);
 void regmap_exit(struct regmap *map)
 {
        kfree(map->work_buf);
-       module_put(map->bus->owner);
        kfree(map);
 }
 EXPORT_SYMBOL_GPL(regmap_exit);