Staging: ramzswap: Free memory when create_device is failed
authorMinchan Kim <minchan.kim@gmail.com>
Mon, 11 Jan 2010 07:15:53 +0000 (16:15 +0900)
committerMatt Sealey <matt@genesi-usa.com>
Fri, 10 Sep 2010 15:59:01 +0000 (10:59 -0500)
commitab65acee3ce7c61a19c416c2f5193a6bfa27a555
tree16794b661c89821fa419d12b107bbf6bc0d359dd
parent61f5861239def61c1a96c16c04c6a4ea5d4b2e5a
Staging: ramzswap: Free memory when create_device is failed

If create_device is failed, it can't free gendisk and request_queue of
preceding devices. It cause memory leak.

This patch fixes it.

Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
Acked-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/ramzswap/ramzswap_drv.c