patch-2.4.20 linux-2.4.20/arch/m68k/bvme6000/rtc.c

Next file: linux-2.4.20/arch/m68k/config.in
Previous file: linux-2.4.20/arch/m68k/bvme6000/config.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.19/arch/m68k/bvme6000/rtc.c linux-2.4.20/arch/m68k/bvme6000/rtc.c
@@ -94,7 +94,7 @@
 
 		leap_yr = ((!(yrs % 4) && (yrs % 100)) || !(yrs % 400));
 
-		if ((mon > 12) || (day == 0))
+		if ((mon > 12) || (mon < 1) || (day == 0))
 			return -EINVAL;
 
 		if (day > (days_in_mo[mon] + ((mon == 2) && leap_yr)))

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)