summaryrefslogtreecommitdiff
path: root/drivers/ata
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2016-02-18 19:50:37 +0300
committerTejun Heo <tj@kernel.org>2016-02-18 19:53:17 +0300
commit3948b6f2b7677165324afe52c3bd0088ca7c776c (patch)
treee45b65abd715060683cb22ddd54b0fd2fd310c10 /drivers/ata
parenta2127e400edd2258fda6d83fe8b10b878a3595d9 (diff)
downloadlinux-3948b6f2b7677165324afe52c3bd0088ca7c776c.tar.xz
libata: fix unbalanced spin_lock_irqsave/spin_unlock_irq() in ata_scsi_park_show()
ata_scsi_park_show() was pairing spin_lock_irqsave() with spin_unlock_irq(). As the function is always called with irq enabled, it didn't actually break anything. Use spin_lock_irq() instead. Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: Elias Oltmanns <eo@nebensachen.de>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/libata-scsi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index e417e1a1d02c..567859ce0512 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -174,13 +174,13 @@ static ssize_t ata_scsi_park_show(struct device *device,
struct ata_port *ap;
struct ata_link *link;
struct ata_device *dev;
- unsigned long flags, now;
+ unsigned long now;
unsigned int uninitialized_var(msecs);
int rc = 0;
ap = ata_shost_to_port(sdev->host);
- spin_lock_irqsave(ap->lock, flags);
+ spin_lock_irq(ap->lock);
dev = ata_scsi_find_dev(ap, sdev);
if (!dev) {
rc = -ENODEV;