aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spidev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/spi/spidev.c')
-rw-r--r--drivers/spi/spidev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c
index 91a0fcd72423..d0e7dfc647cf 100644
--- a/drivers/spi/spidev.c
+++ b/drivers/spi/spidev.c
@@ -651,11 +651,11 @@ static int spidev_release(struct inode *inode, struct file *filp)
651 kfree(spidev->rx_buffer); 651 kfree(spidev->rx_buffer);
652 spidev->rx_buffer = NULL; 652 spidev->rx_buffer = NULL;
653 653
654 spin_lock_irq(&spidev->spi_lock);
654 if (spidev->spi) 655 if (spidev->spi)
655 spidev->speed_hz = spidev->spi->max_speed_hz; 656 spidev->speed_hz = spidev->spi->max_speed_hz;
656 657
657 /* ... after we unbound from the underlying device? */ 658 /* ... after we unbound from the underlying device? */
658 spin_lock_irq(&spidev->spi_lock);
659 dofree = (spidev->spi == NULL); 659 dofree = (spidev->spi == NULL);
660 spin_unlock_irq(&spidev->spi_lock); 660 spin_unlock_irq(&spidev->spi_lock);
661 661