diff options
| -rw-r--r-- | sys/dev/sound/pci/hda/hdacc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/sound/pci/hda/hdacc.c b/sys/dev/sound/pci/hda/hdacc.c index 123c64d9c487..009c9098ac3b 100644 --- a/sys/dev/sound/pci/hda/hdacc.c +++ b/sys/dev/sound/pci/hda/hdacc.c @@ -539,9 +539,10 @@ hdacc_detach(device_t dev) struct hdacc_softc *codec = device_get_softc(dev); int error; - error = device_delete_children(dev); + if ((error = device_delete_children(dev)) != 0) + return (error); free(codec->fgs, M_HDACC); - return (error); + return (0); } static int |
