> if register_cache get error, memory pointed by ca should be released. > and also, blkdev_put should be called I think. No! if register_cache fail, kobject_put(&ca->kobj) will be called, and memory will be released in bch_cache_release(). Also for the next patch: "fix some potential memory leak in bcache_device_init" Please check again. This email also means I am back, with this new email address.