Marcelo Roberto Jimenez 83a06bf50b RTC: Prevents a division by zero in kernel code.
This patch prevents a user space program from calling the RTC_IRQP_SET
ioctl with a negative value of frequency. Also, if this call is make
with a zero value of frequency, there would be a division by zero in the
kernel code.

[jstultz: Also initialize irq_freq to 1 to catch other divbyzero issues]

CC: Alessandro Zummo <a.zummo@towertech.it>
CC: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Marcelo Roberto Jimenez <mroberto@cpti.cetuc.puc-rio.br>
Signed-off-by: John Stultz <john.stultz@linaro.org>
2011-02-03 12:59:50 -08:00
..
2010-11-11 11:34:27 +01:00
2009-09-23 07:39:46 -07:00
2009-02-11 14:25:36 -08:00
2011-01-13 08:03:12 -08:00
2009-02-05 12:56:46 -08:00
2009-09-23 07:39:43 -07:00
2009-04-01 08:59:24 -07:00
2009-09-23 07:39:43 -07:00
2011-01-14 12:38:16 +01:00
2009-04-02 01:05:32 +00:00
2009-09-23 07:39:43 -07:00
2010-08-11 08:59:08 -07:00
2010-12-22 19:43:34 -08:00
2010-11-08 15:08:42 +09:00
2008-11-21 01:24:38 -08:00
2008-11-14 16:37:54 -08:00
2009-12-16 07:20:00 -08:00