summaryrefslogtreecommitdiff
path: root/drivers/scsi/isci/request.h
diff options
context:
space:
mode:
authorBartosz Barcinski <Bartosz.Barcinski@intel.com>2011-04-12 17:28:43 -0700
committerDan Williams <dan.j.williams@intel.com>2011-07-03 04:00:37 -0700
commit6cb4d6b382be6345c2d0c4b1b90dfdf9af32da7e (patch)
tree9d9849a1557888051429a36d4ffa2cbd2dd3591e /drivers/scsi/isci/request.h
parent467e855a0331f619f41fbf7391bc29ec0ca923a0 (diff)
isci: audit usage of BUG_ON macro in isci driver
Removes unnecessary usage of BUG_ON macro, excluding core directory. In some cases macro is unnecesary, check is done in caller function. In other cases macro is replaced by if construction with appropriate warning. Signed-off-by: Maciej Patelczyk <maciej.patelczyk@intel.com> [changed some survivable bug conditions to WARN_ONCE] Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/scsi/isci/request.h')
-rw-r--r--drivers/scsi/isci/request.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/scsi/isci/request.h b/drivers/scsi/isci/request.h
index 0c08da6bcd8a..642b21166fc6 100644
--- a/drivers/scsi/isci/request.h
+++ b/drivers/scsi/isci/request.h
@@ -193,8 +193,6 @@ static inline enum isci_request_status isci_request_change_started_to_newstate(
enum isci_request_status old_state;
unsigned long flags;
- BUG_ON(isci_request == NULL);
-
spin_lock_irqsave(&isci_request->state_lock, flags);
old_state = isci_request->status;
@@ -243,7 +241,8 @@ static inline void isci_request_free(
struct isci_host *isci_host,
struct isci_request *isci_request)
{
- BUG_ON(isci_request == NULL);
+ if (!isci_request)
+ return;
/* release the dma memory if we fail. */
dma_pool_free(isci_host->dma_pool, isci_request,