summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2016-09-01 09:47:48 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2016-09-01 09:47:48 +0000
commitaf5e88472b573e1456f44a0e580c0ad66da9dbd4 (patch)
treeb7dd7fd3849310f19ac3ce34aa4287d368529850 /sys/dev
parent9a95c6ff161e6f90c43b53920c4d19033d8ce148 (diff)
Always initialize error code returned from iwm_firmware_load_chunk().
Patch by Imre Vadasz.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/if_iwm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c
index 58d72721c8a..81eb3a63c3f 100644
--- a/sys/dev/pci/if_iwm.c
+++ b/sys/dev/pci/if_iwm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwm.c,v 1.99 2016/08/17 09:39:38 stsp Exp $ */
+/* $OpenBSD: if_iwm.c,v 1.100 2016/09/01 09:47:47 stsp Exp $ */
/*
* Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
@@ -3169,6 +3169,7 @@ iwm_firmware_load_chunk(struct iwm_softc *sc, uint32_t dst_addr,
iwm_nic_unlock(sc);
/* wait 1s for this segment to load */
+ error = 0;
while (!sc->sc_fw_chunk_done)
if ((error = tsleep(&sc->sc_fw, 0, "iwmfw", hz)) != 0)
break;