]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/scsi/scsi_debug.c
libertas: make lbs_ibss_join_existing() return error code on rates overflow
[mirror_ubuntu-bionic-kernel.git] / drivers / scsi / scsi_debug.c
index 365a755b62c6e273ffa782a60027e9dc49931490..551318bd76b65eca99876415a14d0d833d2a9312 100644 (file)
@@ -4970,6 +4970,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;