Staging: ramzswap: Return proper error code on device create failure
authorNitin Gupta <ngupta@vflare.org>
Thu, 28 Jan 2010 15:43:40 +0000 (21:13 +0530)
committerMatt Sealey <matt@genesi-usa.com>
Fri, 10 Sep 2010 16:02:19 +0000 (11:02 -0500)
commitd19379392ae85c1716b688ae9a5207fb8fdaa5fa
treeefae5ea3727b2d812eeb963d76a4ebd6e2f58e20
parent2461101919185548188987f13f535396f07bee08
Staging: ramzswap: Return proper error code on device create failure

Currently, we return 0 if create_device() fails and 1 otherwise.
Now, proper error code is returned from create_device() and the
same is propagated as module error code from ramzswap_init().

Also added some cleanups for ramzswap_init(), improving function
structure.

Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/ramzswap/ramzswap_drv.c