aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorShahar Havivi <shaharh@redhat.com>2010-08-28 03:09:05 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-09-03 20:37:15 -0400
commit273ad8dcef345cac55a5db910137c10953f81480 (patch)
treebed2e29a7e3d9338008153f5e24db71596d49d51 /drivers
parent9e693e4375689cb1cd1529aba011de0044f74ef5 (diff)
Staging: zram: free device memory when init fails
Signed-off-by: Shahar Havivi <shaharh@redhat.com> Cc: Nitin Gupta <ngupta@vflare.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/zram/zram_drv.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/zram/zram_drv.c b/drivers/staging/zram/zram_drv.c
index 77d4d715a789..722c840ac638 100644
--- a/drivers/staging/zram/zram_drv.c
+++ b/drivers/staging/zram/zram_drv.c
@@ -769,6 +769,7 @@ static int __init zram_init(void)
769free_devices: 769free_devices:
770 while (dev_id) 770 while (dev_id)
771 destroy_device(&devices[--dev_id]); 771 destroy_device(&devices[--dev_id]);
772 kfree(devices);
772unregister: 773unregister:
773 unregister_blkdev(zram_major, "zram"); 774 unregister_blkdev(zram_major, "zram");
774out: 775out: