-/* $OpenBSD: apldma.c,v 1.2 2022/07/27 20:18:46 kettenis Exp $ */
+/* $OpenBSD: apldma.c,v 1.3 2022/10/12 11:29:53 jsg Exp $ */
/*
* Copyright (c) 2022 Mark Kettenis <kettenis@openbsd.org>
*
goto unmap;
}
sc->sc_ac = mallocarray(sc->sc_nchannels,
- sizeof(struct apldma_channel), M_DEVBUF, M_WAITOK | M_ZERO);
+ sizeof(struct apldma_channel *), M_DEVBUF, M_WAITOK | M_ZERO);
sc->sc_dmat = faa->fa_dmat;
sc->sc_node = faa->fa_node;
free:
free(sc->sc_ac, M_DEVBUF,
- sc->sc_nchannels * sizeof(struct apldma_channel));
+ sc->sc_nchannels * sizeof(struct apldma_channel *));
unmap:
bus_space_unmap(sc->sc_iot, sc->sc_ioh, faa->fa_reg[0].size);
}