summaryrefslogtreecommitdiffstats
path: root/drivers/staging/slicoss
diff options
context:
space:
mode:
authorDan Carpenter2015-05-19 14:25:24 +0200
committerGreg Kroah-Hartman2015-05-31 04:47:56 +0200
commit46d74c38eba22bee848c205e8a98fc4b6b53a081 (patch)
treecdaae35f30a26259a010b8f5b9aad75c21d78791 /drivers/staging/slicoss
parentstaging: gdm72xx: Fix typos in printk (diff)
downloadkernel-qcow2-linux-46d74c38eba22bee848c205e8a98fc4b6b53a081.tar.gz
kernel-qcow2-linux-46d74c38eba22bee848c205e8a98fc4b6b53a081.tar.xz
kernel-qcow2-linux-46d74c38eba22bee848c205e8a98fc4b6b53a081.zip
staging: slicoss: restore IRQs correctly after slic_cmdq_reset()
We can't save two different values in "flags" so it means that IRQs are not enabled properly at the end of this function. This isn't a problem in the current code because it's always called with IRQs disabled so we don't want to enable them at the end. This bug is old but it's thanks to David Matlack's recent cleanups that Smatch can detect it. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: David Matlack <dmatlack@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/slicoss')
-rw-r--r--drivers/staging/slicoss/slicoss.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c
index 5f34ebbf7b31..a609f3e67256 100644
--- a/drivers/staging/slicoss/slicoss.c
+++ b/drivers/staging/slicoss/slicoss.c
@@ -1392,7 +1392,7 @@ static void slic_cmdq_reset(struct adapter *adapter)
unsigned long flags;
spin_lock_irqsave(&adapter->cmdq_free.lock, flags);
- spin_lock_irqsave(&adapter->cmdq_done.lock, flags);
+ spin_lock(&adapter->cmdq_done.lock);
outstanding = adapter->cmdq_all.count - adapter->cmdq_done.count;
outstanding -= adapter->cmdq_free.count;
hcmd = adapter->cmdq_all.head;
@@ -1423,7 +1423,7 @@ static void slic_cmdq_reset(struct adapter *adapter)
"free_count %d != all count %d\n",
adapter->cmdq_free.count, adapter->cmdq_all.count);
}
- spin_unlock_irqrestore(&adapter->cmdq_done.lock, flags);
+ spin_unlock(&adapter->cmdq_done.lock);
spin_unlock_irqrestore(&adapter->cmdq_free.lock, flags);
}