Commit bcadb1dc authored by Monam Agarwal's avatar Monam Agarwal Committed by Greg Kroah-Hartman

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
Signed-off-by: default avatarMonam Agarwal <monamagarwal123@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4ada1114
...@@ -1422,8 +1422,7 @@ static void slic_cmdq_addcmdpage(struct adapter *adapter, u32 *page) ...@@ -1422,8 +1422,7 @@ static void slic_cmdq_addcmdpage(struct adapter *adapter, u32 *page)
spin_lock_irqsave(&adapter->handle_lock.lock, spin_lock_irqsave(&adapter->handle_lock.lock,
adapter->handle_lock.flags); adapter->handle_lock.flags);
pslic_handle = adapter->pfree_slic_handles; 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, spin_unlock_irqrestore(&adapter->handle_lock.lock,
adapter->handle_lock.flags); adapter->handle_lock.flags);
pslic_handle->type = SLIC_HANDLE_CMD; pslic_handle->type = SLIC_HANDLE_CMD;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment