From: Akinobu Mita Date: Wed, 18 Sep 2013 12:27:27 +0000 (+0900) Subject: [SCSI] scsi_debug: fix invalid value check for guard module parameter X-Git-Tag: v3.13-rc1~99^2~40 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68aee7ba66d390abf48c13791a84f6bce29d6f19;p=pandora-kernel.git [SCSI] scsi_debug: fix invalid value check for guard module parameter In the module initialization, invalid value for guard module parameter is detected by the following check: if (scsi_debug_guard > 1) { printk(KERN_ERR "scsi_debug_init: guard must be 0 or 1\n"); return -EINVAL; } But this check isn't enough, because the type of scsi_debug_guard is 'int' and scsi_debug_guard could be a negative value. This fixes it by changing the type of scsi_debug_guard to 'unsigned int' instead of adding extra check for a negative value. Reported-by: Joe Perches Signed-off-by: Akinobu Mita Acked-by: Martin K. Petersen Signed-off-by: James Bottomley --- Reading git-diff-tree failed