From: Jiang Liu Date: Thu, 6 Jun 2013 16:07:24 +0000 (+0800) Subject: zram: destroy all devices on error recovery path in zram_init() X-Git-Tag: v3.2.49~72 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=29c303b89a1bc8f1704ffd4c58308781c9f8f844;p=pandora-kernel.git zram: destroy all devices on error recovery path in zram_init() commit 39a9b8ac9333e4268ecff7da6c9d1ab3823ff243 upstream. On error recovery path of zram_init(), it leaks the zram device object causing the failure. So change create_device() to free allocated resources on error path. Signed-off-by: Jiang Liu Acked-by: Minchan Kim Acked-by: Jerome Marchand Signed-off-by: Greg Kroah-Hartman [bwh: Backported to 3.2: adjust context] Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed