devqspi: fix qunlock error on stat() -> close()

This commit is contained in:
cinap_lenrek 2015-09-05 13:18:28 +02:00
parent fdfd856d1d
commit 431cbe35f6

View file

@ -213,7 +213,7 @@ qspiopen(Chan* c, int omode)
static void
qspiclose(Chan* c)
{
if(c->qid.path == Qboot)
if(c->qid.path == Qboot && (c->flag & COPEN) != 0)
qunlock(&qspil);
}