Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Feb 2003 09:28:01 -0500 (EST)
From:      "Matthew N. Dodd" <winter@jurai.net>
To:        Nate Lawson <nate@root.org>
Cc:        current@FreeBSD.ORG, wpaul@FreeBSD.ORG
Subject:   Re: sys/pci/if* fixes
Message-ID:  <20030215092452.E73971@sasami.jurai.net>
In-Reply-To: <Pine.BSF.4.21.0302141503110.39134-100000@root.org>
References:  <Pine.BSF.4.21.0302141503110.39134-100000@root.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 14 Feb 2003, Nate Lawson wrote:
> Also, except for xl, all drivers have a common cleanup on error in
> attach that backs out allocated resources with no assumptions about the
> order they were allocated in.

Please see if_pcn.c for the correct approach to freeing resources; its not
necessary to wrap evrything in 'if (sc && error != 0) {}'.  If execution
reaches the 'fail' label then you assume that is what happened.

I also think you should just drop and reaquire locks around the
bus_setup_intr() rather than moving code around.

--
| Matthew N. Dodd  | '78 Datsun 280Z | '75 Volvo 164E | FreeBSD/NetBSD  |
| winter@jurai.net |       2 x '84 Volvo 245DL        | ix86,sparc,pmax |
| http://www.jurai.net/~winter |  For Great Justice!  | ISO8802.5 4ever |

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030215092452.E73971>