From owner-cvs-all@FreeBSD.ORG Thu Feb 15 07:22:28 2007 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3AB3716A406; Thu, 15 Feb 2007 07:22:28 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 158AC13C474; Thu, 15 Feb 2007 07:22:28 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id l1F7MRaE074020; Thu, 15 Feb 2007 07:22:27 GMT (envelope-from imp@repoman.freebsd.org) Received: (from imp@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id l1F7MRxu074019; Thu, 15 Feb 2007 07:22:27 GMT (envelope-from imp) Message-Id: <200702150722.l1F7MRxu074019@repoman.freebsd.org> From: Warner Losh Date: Thu, 15 Feb 2007 07:22:27 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/dev/exca exca.c src/sys/dev/pccbb pccbb.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Feb 2007 07:22:28 -0000 imp 2007-02-15 07:22:27 UTC FreeBSD src repository Modified files: sys/dev/exca exca.c sys/dev/pccbb pccbb.c Log: It turns out that it is easier to not NULL out pccard and cardbus device pointers. They don't change as the children device drivers come and go. Rather, check to see if the device is attached where we would have checked ! NULL. This solves many asymmetries in the code that likely could lead to crashes when loading/unloading cbb without one or more of the expected children's driver not present. Revision Changes Path 1.26 +1 -1 src/sys/dev/exca/exca.c 1.153 +6 -14 src/sys/dev/pccbb/pccbb.c