Skip to content
Commit 5edc8c68 authored by Ahmad Fatoum's avatar Ahmad Fatoum Committed by Wim Van Sebroeck
Browse files

watchdog: f71808e_wdt: do stricter parameter validation



We check the f71862fg_pin module parameter every time a watchdog device
for the f71862fg is opened, but the parameter can't change at runtime.

If we move the check to the start of init:

  - We catch userspace passing invalid, but unused, values
  - We check the condition only once
  - We simplify the code

Do so.

Signed-off-by: default avatarAhmad Fatoum <a.fatoum@pengutronix.de>
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20200611191750.28096-6-a.fatoum@pengutronix.de


Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarWim Van Sebroeck <wim@linux-watchdog.org>
parent 4f39d575
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment