summaryrefslogtreecommitdiff
path: root/sys/dev/ic/aic7xxx_inline.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/ic/aic7xxx_inline.h')
-rw-r--r--sys/dev/ic/aic7xxx_inline.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/sys/dev/ic/aic7xxx_inline.h b/sys/dev/ic/aic7xxx_inline.h
index 5ddc5c6b157..34ae4709177 100644
--- a/sys/dev/ic/aic7xxx_inline.h
+++ b/sys/dev/ic/aic7xxx_inline.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: aic7xxx_inline.h,v 1.11 2005/07/18 02:43:26 fgsch Exp $ */
+/* $OpenBSD: aic7xxx_inline.h,v 1.12 2005/12/04 03:56:17 krw Exp $ */
/* $NetBSD: aic7xxx_inline.h,v 1.4 2003/11/02 11:07:44 wiz Exp $ */
/*
@@ -378,13 +378,11 @@ ahc_get_scb(struct ahc_softc *ahc)
{
struct scb *scb;
- if ((scb = SLIST_FIRST(&ahc->scb_data->free_scbs)) == NULL) {
- ahc_alloc_scbs(ahc);
- scb = SLIST_FIRST(&ahc->scb_data->free_scbs);
- if (scb == NULL)
- return (NULL);
- }
- SLIST_REMOVE_HEAD(&ahc->scb_data->free_scbs, links.sle);
+ scb = SLIST_FIRST(&ahc->scb_data->free_scbs);
+
+ if (scb != NULL)
+ SLIST_REMOVE_HEAD(&ahc->scb_data->free_scbs, links.sle);
+
return (scb);
}