Module Name: src
Committed By: jakllsch
Date: Fri Dec 14 20:44:37 UTC 2018
Modified Files:
src/sys/dev/ic: malo.c
Log Message:
always use correct function to free our copy of the microcode
To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/ic/malo.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/ic/malo.c
diff -u src/sys/dev/ic/malo.c:1.13 src/sys/dev/ic/malo.c:1.14
--- src/sys/dev/ic/malo.c:1.13 Mon Sep 3 16:29:31 2018
+++ src/sys/dev/ic/malo.c Fri Dec 14 20:44:36 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: malo.c,v 1.13 2018/09/03 16:29:31 riastradh Exp $ */
+/* $NetBSD: malo.c,v 1.14 2018/12/14 20:44:36 jakllsch Exp $ */
/* $OpenBSD: malo.c,v 1.92 2010/08/27 17:08:00 jsg Exp $ */
/*
@@ -19,7 +19,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: malo.c,v 1.13 2018/09/03 16:29:31 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: malo.c,v 1.14 2018/12/14 20:44:36 jakllsch Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -1727,6 +1727,8 @@ malo_load_bootimg(struct malo_softc *sc)
bus_space_write_region_1(sc->sc_mem1_bt, sc->sc_mem1_bh, 0xbf00,
ucode, size);
+ firmware_free(ucode, size);
+
/*
* we loaded the firmware into card memory now tell the CPU
* to fetch the code and execute it. The memory mapped via the
@@ -1743,10 +1745,8 @@ malo_load_bootimg(struct malo_softc *sc)
}
if (i == 10) {
aprint_error_dev(sc->sc_dev, "timeout at boot firmware load!\n");
- free(ucode, M_DEVBUF);
return (ETIMEDOUT);
}
- firmware_free(ucode, size);
/* tell the card we're done and... */
malo_mem_write2(sc, 0xbef8, 0x001);