Skip to content

Commit

Permalink
Staging: slicoss: Fix smatch warning in slicoss.c
Browse files Browse the repository at this point in the history
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: Monam Agarwal <monamagarwal123@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Monam Agarwal authored and Greg Kroah-Hartman committed Apr 25, 2014
1 parent 4ada111 commit bcadb1d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/staging/slicoss/slicoss.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit bcadb1d

Please sign in to comment.