summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authormjacob <mjacob@FreeBSD.org>2007-03-28 16:34:11 +0000
committermjacob <mjacob@FreeBSD.org>2007-03-28 16:34:11 +0000
commit625c677e93c06d5f8011503de35094a5cb3b8442 (patch)
tree06c37c8b4833eb5b0693be8a5fed20c5e17f1d47 /sys/dev
parent7c280152d9a548d1d8972aca148231c30a69e94e (diff)
downloadFreeBSD-src-625c677e93c06d5f8011503de35094a5cb3b8442.zip
FreeBSD-src-625c677e93c06d5f8011503de35094a5cb3b8442.tar.gz
Don't derference a pointer before setting it.
Very Pointy Dunce Cap T o: me. Submitted by: Marcel MFC after: 3 days
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/isp/isp_sbus.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/isp/isp_sbus.c b/sys/dev/isp/isp_sbus.c
index db322d5..af68ec1 100644
--- a/sys/dev/isp/isp_sbus.c
+++ b/sys/dev/isp/isp_sbus.c
@@ -193,8 +193,6 @@ isp_sbus_attach(device_t dev)
sbs->sbus_dev = dev;
sbs->sbus_reg = regs;
sbs->sbus_mdvec = mdvec;
- isp->isp_bus_tag = rman_get_bustag(regs);
- isp->isp_bus_handle = rman_get_bushandle(regs);
sbs->sbus_poff[BIU_BLOCK >> _BLK_REG_SHFT] = BIU_REGS_OFF;
sbs->sbus_poff[MBOX_BLOCK >> _BLK_REG_SHFT] = SBUS_MBOX_REGS_OFF;
@@ -202,6 +200,8 @@ isp_sbus_attach(device_t dev)
sbs->sbus_poff[RISC_BLOCK >> _BLK_REG_SHFT] = SBUS_RISC_REGS_OFF;
sbs->sbus_poff[DMA_BLOCK >> _BLK_REG_SHFT] = DMA_REGS_OFF;
isp = &sbs->sbus_isp;
+ isp->isp_bus_tag = rman_get_bustag(regs);
+ isp->isp_bus_handle = rman_get_bushandle(regs);
isp->isp_mdvec = &sbs->sbus_mdvec;
isp->isp_bustype = ISP_BT_SBUS;
isp->isp_type = ISP_HA_SCSI_UNKNOWN;
OpenPOWER on IntegriCloud