Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/cortex Make sure freq is not 0.
details: https://anonhg.NetBSD.org/src/rev/27ba06045c14
branches: trunk
changeset: 328672:27ba06045c14
user: matt <matt%NetBSD.org@localhost>
date: Sun Apr 13 02:22:21 2014 +0000
description:
Make sure freq is not 0.
diffstat:
sys/arch/arm/cortex/gtmr.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r e7b8e940a200 -r 27ba06045c14 sys/arch/arm/cortex/gtmr.c
--- a/sys/arch/arm/cortex/gtmr.c Sun Apr 13 02:21:47 2014 +0000
+++ b/sys/arch/arm/cortex/gtmr.c Sun Apr 13 02:22:21 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gtmr.c,v 1.6 2014/03/28 21:41:46 matt Exp $ */
+/* $NetBSD: gtmr.c,v 1.7 2014/04/13 02:22:21 matt Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gtmr.c,v 1.6 2014/03/28 21:41:46 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gtmr.c,v 1.7 2014/04/13 02:22:21 matt Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -103,6 +103,7 @@
* This runs at a fixed frequency of 1 to 50MHz.
*/
prop_dictionary_get_uint32(dict, "frequency", &sc->sc_freq);
+ KASSERT(sc->sc_freq != 0);
humanize_number(freqbuf, sizeof(freqbuf), sc->sc_freq, "Hz", 1000);
Home |
Main Index |
Thread Index |
Old Index