From: Nitin Gupta Date: Thu, 28 Jan 2010 15:49:59 +0000 (+0530) Subject: Staging: ramzswap: Handle case for invalid backing swap X-Git-Tag: v2.6.34-rc1~10^2~1^2~122 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c25d75a234df36446dc0d9bb3365ab8b83374d50;p=pandora-kernel.git Staging: ramzswap: Handle case for invalid backing swap Currently, we crash (issue BUG_ON) if backing swap disk size is zero. This can happen is user specified an extended partition or simply a bad disk as backing swap. A crash is really an unpleasant surprise to user for such trivial problems. Now, we check for this condition and simply fail device initialization if this is the case. Additional cleanups: * use static for all functions * remove extra newline between functions * memset backing_swap_name to NULL on device reset Signed-off-by: Nitin Gupta Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed