From b5a441dc7f7e612c3b93ef93967efccf4cece374 Mon Sep 17 00:00:00 2001 From: miko Date: Thu, 13 Sep 2018 04:07:20 +0000 Subject: [PATCH] clarify that config_activate_children() is called unconditionally in *activate(). ok ratchov@ --- sys/dev/pci/auich.c | 7 ++----- sys/dev/pci/cmpci.c | 7 ++----- sys/dev/pci/eap.c | 7 ++----- sys/dev/pci/emuxki.c | 7 ++----- 4 files changed, 8 insertions(+), 20 deletions(-) diff --git a/sys/dev/pci/auich.c b/sys/dev/pci/auich.c index 498615e53bd..8b821ccd3b2 100644 --- a/sys/dev/pci/auich.c +++ b/sys/dev/pci/auich.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auich.c,v 1.106 2016/09/19 06:46:44 ratchov Exp $ */ +/* $OpenBSD: auich.c,v 1.107 2018/09/13 04:07:20 miko Exp $ */ /* * Copyright (c) 2000,2001 Michael Shalayeff @@ -533,18 +533,15 @@ int auich_activate(struct device *self, int act) { struct auich_softc *sc = (struct auich_softc *)self; - int rv = 0; switch (act) { case DVACT_RESUME: auich_resume(sc); - rv = config_activate_children(self, act); break; default: - rv = config_activate_children(self, act); break; } - return (rv); + return (config_activate_children(self, act)); } int diff --git a/sys/dev/pci/cmpci.c b/sys/dev/pci/cmpci.c index ec5043d749c..7f998e39410 100644 --- a/sys/dev/pci/cmpci.c +++ b/sys/dev/pci/cmpci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmpci.c,v 1.43 2018/04/11 04:48:31 ratchov Exp $ */ +/* $OpenBSD: cmpci.c,v 1.44 2018/09/13 04:07:20 miko Exp $ */ /* $NetBSD: cmpci.c,v 1.25 2004/10/26 06:32:20 xtraeme Exp $ */ /* @@ -511,18 +511,15 @@ int cmpci_activate(struct device *self, int act) { struct cmpci_softc *sc = (struct cmpci_softc *)self; - int rv = 0; switch (act) { case DVACT_RESUME: cmpci_resume(sc); - rv = config_activate_children(self, act); break; default: - rv = config_activate_children(self, act); break; } - return (rv); + return (config_activate_children(self, act)); } int diff --git a/sys/dev/pci/eap.c b/sys/dev/pci/eap.c index f7df55bac1d..e6380526c37 100644 --- a/sys/dev/pci/eap.c +++ b/sys/dev/pci/eap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: eap.c,v 1.54 2018/04/11 04:48:31 ratchov Exp $ */ +/* $OpenBSD: eap.c,v 1.55 2018/09/13 04:07:20 miko Exp $ */ /* $NetBSD: eap.c,v 1.46 2001/09/03 15:07:37 reinoud Exp $ */ /* @@ -273,18 +273,15 @@ int eap_activate(struct device *self, int act) { struct eap_softc *sc = (struct eap_softc *)self; - int rv = 0; switch (act) { case DVACT_RESUME: eap_resume(sc); - rv = config_activate_children(self, act); break; default: - rv = config_activate_children(self, act); break; } - return (rv); + return (config_activate_children(self, act)); } void diff --git a/sys/dev/pci/emuxki.c b/sys/dev/pci/emuxki.c index c49dddd9336..6b637b8bbf9 100644 --- a/sys/dev/pci/emuxki.c +++ b/sys/dev/pci/emuxki.c @@ -1,4 +1,4 @@ -/* $OpenBSD: emuxki.c,v 1.52 2017/09/08 05:36:52 deraadt Exp $ */ +/* $OpenBSD: emuxki.c,v 1.53 2018/09/13 04:07:20 miko Exp $ */ /* $NetBSD: emuxki.c,v 1.1 2001/10/17 18:39:41 jdolecek Exp $ */ /*- @@ -506,19 +506,16 @@ int emuxki_activate(struct device *self, int act) { struct emuxki_softc *sc = (struct emuxki_softc *)self; - int rv = 0; switch (act) { case DVACT_RESUME: emuxki_scinit(sc, 1); ac97_resume(&sc->hostif, sc->codecif); - rv = config_activate_children(self, act); break; default: - rv = config_activate_children(self, act); break; } - return (rv); + return (config_activate_children(self, act)); } /* Misc stuff relative to emu10k1 */ -- 2.20.1