Skip to contentSkip to conversation

Staging: slicoss: Fix smatch warning in slicoss.c

PATCH New Monam Agarwal 1 participant 1 message Mar 27, 2014 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: slicoss: Fix smatch warning in slicoss.c

This patch fixes following smatch warning:
slicoss/slicoss.c:1429 slic_cmdq_addcmdpage() error: we previously assumed 'pslic_handle' could be null

---
 drivers/staging/slicoss/slicoss.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/slicoss/slicoss.c +1 -2
index e27b88f..f350e60 100644
@@ -1422,8 +1422,7 @@ static void slic_cmdq_addcmdpage(struct adapter *adapter, u32 *page)
 		spin_lock_irqsave(&adapter->handle_lock.lock,
 				adapter->handle_lock.flags);
 		pslic_handle  =  adapter->pfree_slic_handles;
-		if (pslic_handle)
-			adapter->pfree_slic_handles = pslic_handle->next;
+		adapter->pfree_slic_handles = pslic_handle->next;
 		spin_unlock_irqrestore(&adapter->handle_lock.lock,
 				adapter->handle_lock.flags);
 		pslic_handle->type = SLIC_HANDLE_CMD;
Signature · 1 line
1.7.9.5