Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/broadcom off by one
details: https://anonhg.NetBSD.org/src/rev/0a548b4b462f
branches: trunk
changeset: 464565:0a548b4b462f
user: mlelstv <mlelstv%NetBSD.org@localhost>
date: Sat Oct 12 09:46:18 2019 +0000
description:
off by one
diffstat:
sys/arch/arm/broadcom/bcm2835_gpio.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r ad351147f50a -r 0a548b4b462f sys/arch/arm/broadcom/bcm2835_gpio.c
--- a/sys/arch/arm/broadcom/bcm2835_gpio.c Sat Oct 12 09:42:38 2019 +0000
+++ b/sys/arch/arm/broadcom/bcm2835_gpio.c Sat Oct 12 09:46:18 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bcm2835_gpio.c,v 1.15 2019/10/03 11:24:27 mlelstv Exp $ */
+/* $NetBSD: bcm2835_gpio.c,v 1.16 2019/10/12 09:46:18 mlelstv Exp $ */
/*-
* Copyright (c) 2013, 2014, 2017 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcm2835_gpio.c,v 1.15 2019/10/03 11:24:27 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm2835_gpio.c,v 1.16 2019/10/12 09:46:18 mlelstv Exp $");
/*
* Driver for BCM2835 GPIO
@@ -221,7 +221,7 @@
for (int i = 0; i < npins; i++) {
const u_int pin = be32toh(pins[i]);
- if (pin > sc->sc_maxpins)
+ if (pin >= sc->sc_maxpins)
continue;
if (pull) {
const int value = be32toh(pull[npull == 1 ? 0 : i]);
Home |
Main Index |
Thread Index |
Old Index