Commit 273ad8dc authored by Shahar Havivi's avatar Shahar Havivi Committed by Greg Kroah-Hartman

Staging: zram: free device memory when init fails

Signed-off-by: default avatarShahar Havivi <shaharh@redhat.com>
Cc: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 9e693e43
......@@ -769,6 +769,7 @@ static int __init zram_init(void)
free_devices:
while (dev_id)
destroy_device(&devices[--dev_id]);
kfree(devices);
unregister:
unregister_blkdev(zram_major, "zram");
out:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment