summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2016-08-05 21:28:14 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2016-08-05 21:28:14 +0000
commit48d0be88c4cda74312cfc5f27f56f371f2b29052 (patch)
tree509c99cb3daa5de88577dd80250f33be918c50e2 /sys/arch
parentb00f40a3554c99503b727873f7e8bdf394ee069c (diff)
Check if we have the required "reg" property.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/armv7/sunxi/sxiehci.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/arch/armv7/sunxi/sxiehci.c b/sys/arch/armv7/sunxi/sxiehci.c
index e02da5dc0d5..1d86fd0b211 100644
--- a/sys/arch/armv7/sunxi/sxiehci.c
+++ b/sys/arch/armv7/sunxi/sxiehci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sxiehci.c,v 1.5 2016/08/05 19:00:25 kettenis Exp $ */
+/* $OpenBSD: sxiehci.c,v 1.6 2016/08/05 21:28:13 kettenis Exp $ */
/*
* Copyright (c) 2005 David Gwynne <dlg@openbsd.org>
@@ -122,6 +122,9 @@ sxiehci_attach(struct device *parent, struct device *self, void *aux)
usbd_status r;
char *devname = sc->sc.sc_bus.bdev.dv_xname;
+ if (faa->fa_nreg < 1)
+ return;
+
sc->sc.iot = faa->fa_iot;
sc->sc.sc_bus.dmatag = faa->fa_dmat;
sc->sc.sc_size = faa->fa_reg[0].size;