*BSD News Article 10605


Return to BSD News archive

Received: by minnie.vk1xwt.ampr.org with NNTP
	id AA367 ; Sun, 31 Jan 93 14:04:54 EST
Path: sserve!manuel.anu.edu.au!munnari.oz.au!spool.mu.edu!yale.edu!ira.uka.de!math.fu-berlin.de!news.netmbx.de!Germany.EU.net!mcsun!sun4nl!tuegate.tue.nl!eba!svin09!wzv.win.tue.nl!gvr.win.tue.nl!guido
From: guido@gvr.win.tue.nl (Guido van Rooij)
Newsgroups: comp.unix.bsd
Subject: [386bsd] error in wd.c?
Message-ID: <1kh03lINNdpj@wzv.win.tue.nl>
Date: 31 Jan 93 16:52:05 GMT
Sender: news@eb.ele.tue.nl (The News system)
Organization: Eindhoven University of Technology, The Netherlands
Lines: 18
NNTP-Posting-Host: gvr.win.tue.nl

The following is from wd.c, function wdgetctlr.
My question: shouldn't there be the splx(x) not be placed at
the line marked with *** ?
The same can be found in wdsetctlr.

	x = splbio();		/* not called from intr level ... */
	wdc = du->dk_port;
	outb(wdc+wd_sdh, WDSD_IBM | (u << 4));
	stat = wdcommand(du, WDCC_READP);
***
	if (stat < 0)
		return(stat);
	if (stat & WDCS_ERR) {
		splx(x);
		return(inb(wdc+wd_error));
	}

-Guido