diff options
-rw-r--r-- | sys/dev/usb/ubcmtp.c | 11 | ||||
-rw-r--r-- | sys/dev/usb/utpms.c | 11 |
2 files changed, 10 insertions, 12 deletions
diff --git a/sys/dev/usb/ubcmtp.c b/sys/dev/usb/ubcmtp.c index 357de187faf..27898e3488c 100644 --- a/sys/dev/usb/ubcmtp.c +++ b/sys/dev/usb/ubcmtp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ubcmtp.c,v 1.10 2015/11/30 09:30:48 kettenis Exp $ */ +/* $OpenBSD: ubcmtp.c,v 1.11 2015/12/04 16:22:27 kettenis Exp $ */ /* * Copyright (c) 2013-2014, joshua stein <jcs@openbsd.org> @@ -507,16 +507,15 @@ int ubcmtp_activate(struct device *self, int act) { struct ubcmtp_softc *sc = (struct ubcmtp_softc *)self; - int ret; + int rv = 0; if (act == DVACT_DEACTIVATE) { - ret = 0; if (sc->sc_wsmousedev != NULL) - ret = config_deactivate(sc->sc_wsmousedev); + rv = config_deactivate(sc->sc_wsmousedev); usbd_deactivate(sc->sc_udev); - return (ret); } - return (EOPNOTSUPP); + + return (rv); } int diff --git a/sys/dev/usb/utpms.c b/sys/dev/usb/utpms.c index 7bdb4aba7c0..4308833f40f 100644 --- a/sys/dev/usb/utpms.c +++ b/sys/dev/usb/utpms.c @@ -1,4 +1,4 @@ -/* $OpenBSD: utpms.c,v 1.5 2014/05/26 07:46:16 mpi Exp $ */ +/* $OpenBSD: utpms.c,v 1.6 2015/12/04 16:22:27 kettenis Exp $ */ /* * Copyright (c) 2005, Johan Wallén @@ -368,15 +368,14 @@ int utpms_activate(struct device *self, int act) { struct utpms_softc *sc = (struct utpms_softc *)self; - int ret; + int rv = 0; if (act == DVACT_DEACTIVATE) { - ret = 0; if (sc->sc_wsmousedev != NULL) - ret = config_deactivate(sc->sc_wsmousedev); - return (ret); + rv = config_deactivate(sc->sc_wsmousedev); } - return (EOPNOTSUPP); + + return (rv); } int |