HomeFreeBSD

if_ffec: free the dmamem allocation in detach

Description

if_ffec: free the dmamem allocation in detach

Calling bus_dmamap_destroy() for a mapping which was allocated with
bus_dmamem_alloc() will result in a panic. This change is not run-time
tested, but I identified the issue while implementing the analogous
method in if_dwc(4), using this implementation as the template.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 8757d0fca9e6a9e174bc87728e296e5338d30eb7)

Details

Provenance
mhorneAuthored on Jun 15 2022, 3:53 PM
Parents
rGeea2563d7fc5: if_ffec: fix some misleading indentation
Branches
Unknown
Tags
Unknown