summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/adb/adb_mouse.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/adb/adb_mouse.c b/sys/dev/adb/adb_mouse.c
index 8b9c7d1..b290d5e 100644
--- a/sys/dev/adb/adb_mouse.c
+++ b/sys/dev/adb/adb_mouse.c
@@ -382,6 +382,7 @@ ams_read(struct cdev *dev, struct uio *uio, int flag)
struct adb_mouse_softc *sc;
size_t len;
int8_t outpacket[8];
+ int error;
sc = CDEV_GET_SOFTC(dev);
if (sc == NULL)
@@ -403,7 +404,11 @@ ams_read(struct cdev *dev, struct uio *uio, int flag)
/* Otherwise, block on new data */
- cv_wait(&sc->sc_cv,&sc->sc_mtx);
+ error = cv_wait_sig(&sc->sc_cv, &sc->sc_mtx);
+ if (error) {
+ mtx_unlock(&sc->sc_mtx);
+ return (error);
+ }
}
sc->packet[0] = 1 << 7;
OpenPOWER on IntegriCloud