Restore interrupts on error paths. From maxv's brainy list.

This commit is contained in:
dholland 2015-08-30 04:16:18 +00:00
parent aa2adc6c3e
commit 040c7cc074

View File

@ -1,4 +1,4 @@
/* $NetBSD: arcpp.c,v 1.14 2014/07/25 08:10:31 dholland Exp $ */
/* $NetBSD: arcpp.c,v 1.15 2015/08/30 04:16:18 dholland Exp $ */
/*-
* Copyright (c) 2001 Ben Harris
@ -52,7 +52,7 @@
#include <sys/param.h>
__KERNEL_RCSID(0, "$NetBSD: arcpp.c,v 1.14 2014/07/25 08:10:31 dholland Exp $");
__KERNEL_RCSID(0, "$NetBSD: arcpp.c,v 1.15 2015/08/30 04:16:18 dholland Exp $");
#include <sys/conf.h>
#include <sys/device.h>
@ -217,10 +217,12 @@ arcppopen(dev_t dev, int flag, int mode, struct lwp *l)
error = tsleep((void *)sc, ARCPPPRI | PCATCH, "arcppopen", TIMEOUT);
if (error == EWOULDBLOCK) {
sc->sc_state = 0;
splx(s);
return EBUSY;
}
if (error) {
sc->sc_state = 0;
splx(s);
return error;
}