From: Paul Bolle Date: Tue, 4 Feb 2014 22:23:40 +0000 (+0100) Subject: raw: set range for MAX_RAW_DEVS X-Git-Tag: upstream/snapshot3+hdmi~3422^2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7143479a6a4f853881b19999310ada53b616d2ca;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git raw: set range for MAX_RAW_DEVS The Kconfig symbol MAX_RAW_DEVS is meant to be between 1 and 65536. But those boundaries are not enforced by its Kconfig entry. Note that MAX_RAW_DEVS is used to set MAX_RAW_MINORS in drivers/char/raw.c. If one would accidentally set MAX_RAW_DEVS to an invalid value, that invalid value will actually end up being used in raw_init(). So add an appropriate range to this Kconfig entry. Signed-off-by: Paul Bolle Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index fa3243d..1386749 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig @@ -499,6 +499,7 @@ config RAW_DRIVER config MAX_RAW_DEVS int "Maximum number of RAW devices to support (1-65536)" depends on RAW_DRIVER + range 1 65536 default "256" help The maximum number of RAW devices that are supported.