Merge branch 'regmap-linus' into regmap-next
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 5 Sep 2011 17:56:57 +0000 (10:56 -0700)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 5 Sep 2011 17:56:57 +0000 (10:56 -0700)
1  2 
drivers/base/regmap/regmap.c

@@@ -198,15 -168,11 +198,13 @@@ struct regmap *regmap_init(struct devic
        map->work_buf = kmalloc(map->format.buf_size, GFP_KERNEL);
        if (map->work_buf == NULL) {
                ret = -ENOMEM;
-               goto err_bus;
+               goto err_map;
        }
  
 +      regmap_debugfs_init(map);
 +
        return map;
  
- err_bus:
-       module_put(map->bus->owner);
  err_map:
        kfree(map);
  err:
@@@ -219,9 -185,7 +217,8 @@@ EXPORT_SYMBOL_GPL(regmap_init)
   */
  void regmap_exit(struct regmap *map)
  {
 +      regmap_debugfs_exit(map);
        kfree(map->work_buf);
-       module_put(map->bus->owner);
        kfree(map);
  }
  EXPORT_SYMBOL_GPL(regmap_exit);