Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Apr 2010 18:49:46 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r207335 - head/sys/dev/ciss
Message-ID:  <201004281849.o3SInkv3014269@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Wed Apr 28 18:49:45 2010
New Revision: 207335
URL: http://svn.freebsd.org/changeset/base/207335

Log:
  Initialize the callout structure earlier in attach before calling any
  routines that can fail since ciss_free() always tries to stop and drain
  the callout.

Modified:
  head/sys/dev/ciss/ciss.c

Modified: head/sys/dev/ciss/ciss.c
==============================================================================
--- head/sys/dev/ciss/ciss.c	Wed Apr 28 18:29:48 2010	(r207334)
+++ head/sys/dev/ciss/ciss.c	Wed Apr 28 18:49:45 2010	(r207335)
@@ -417,6 +417,7 @@ ciss_attach(device_t dev)
     sc = device_get_softc(dev);
     sc->ciss_dev = dev;
     mtx_init(&sc->ciss_mtx, "cissmtx", NULL, MTX_DEF);
+    callout_init_mtx(&sc->ciss_periodic, &sc->ciss_mtx, 0);
 
     /*
      * Do PCI-specific init.
@@ -429,7 +430,6 @@ ciss_attach(device_t dev)
      */
     ciss_initq_free(sc);
     ciss_initq_notify(sc);
-    callout_init_mtx(&sc->ciss_periodic, &sc->ciss_mtx, 0);
 
     /*
      * Initalize device sysctls.



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