diff options
author | Monam Agarwal <monamagarwal123@gmail.com> | 2014-03-27 20:01:01 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-04-25 16:05:12 -0700 |
commit | bcadb1dcb123e634a3e40019a5fe80c93f520e9f (patch) | |
tree | 92e7896de8647db578ce281f9c638c66b9296dc0 /drivers/staging/slicoss | |
parent | 4ada11147e446c56a7bd12e519777db12764d293 (diff) |
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: Monam Agarwal <monamagarwal123@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/slicoss')
-rw-r--r-- | drivers/staging/slicoss/slicoss.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c index e27b88f02ccd..f350e6028ed2 100644 --- a/drivers/staging/slicoss/slicoss.c +++ b/drivers/staging/slicoss/slicoss.c @@ -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; |