浏览代码

[SERIAL] 8250: limit range of runtime ports

Prevent SERIAL_8250_RUNTIME_UARTS being larger than SERIAL_8250_NR_UARTS.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Russell King 19 年之前
父节点
当前提交
9a8ffccf3d
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/serial/Kconfig

+ 1 - 0
drivers/serial/Kconfig

@@ -98,6 +98,7 @@ config SERIAL_8250_NR_UARTS
 config SERIAL_8250_RUNTIME_UARTS
 config SERIAL_8250_RUNTIME_UARTS
 	int "Number of 8250/16550 serial ports to register at runtime"
 	int "Number of 8250/16550 serial ports to register at runtime"
 	depends on SERIAL_8250
 	depends on SERIAL_8250
+	range 0 SERIAL_8250_NR_UARTS
 	default "4"
 	default "4"
 	help
 	help
 	  Set this to the maximum number of serial ports you want
 	  Set this to the maximum number of serial ports you want