diff --git a/sys/dev/sound/pci/hda/hdacc.c b/sys/dev/sound/pci/hda/hdacc.c --- a/sys/dev/sound/pci/hda/hdacc.c +++ b/sys/dev/sound/pci/hda/hdacc.c @@ -539,9 +539,10 @@ 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