diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index ccb1f33b634db203d517b07a19c093cd7b3f06b5..082b2695e02f32219002898073e9de0844bf7658 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -5352,6 +5352,11 @@ static int __init scsi_debug_init(void) return -EINVAL; } + if (sdebug_num_tgts < 0) { + pr_err("num_tgts must be >= 0\n"); + return -EINVAL; + } + if (sdebug_guard > 1) { pr_err("guard must be 0 or 1\n"); return -EINVAL;