diff --git a/sys/dev/ieee488/upd7210.c b/sys/dev/ieee488/upd7210.c index d952bc2fa73..e4b50ace490 100644 --- a/sys/dev/ieee488/upd7210.c +++ b/sys/dev/ieee488/upd7210.c @@ -177,8 +177,10 @@ gpib_l_open(struct cdev *dev, int oflags, int devtype, struct thread *td) u = dev->si_drv1; mtx_lock(&u->mutex); - if (u->busy) + if (u->busy) { + mtx_unlock(&u->mutex); return (EBUSY); + } u->busy = 1; u->irq = gpib_l_irq; mtx_unlock(&u->mutex);