path: root/drivers
diff options
authorLinus Torvalds <torvalds@linux-foundation.org>2013-06-24 20:17:11 -1000
committerLinus Torvalds <torvalds@linux-foundation.org>2013-06-24 20:17:11 -1000
commitf97f7d2d27bf092b40babda9ded29cc85cf77eec (patch)
treebd6b038bb85e6265c8aed04211687ac6f5b859e5 /drivers
parentacdb37c361dc87e165889a504e291c1e82ae133c (diff)
parent332ec81d413bd4e7375c25d628e7f658c37138f6 (diff)
Merge tag 'spi-v3.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
Pull spi updates from Mark Brown: "A few last minute SPI updates: fix a missized allocation and use atomic allocations in atomic context in the PXA driver, and fix the checking of return codes in the S3C64xx driver which caused spurious errors under heavy load." * tag 'spi-v3.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi/pxa2xx: fix memory corruption due to wrong size used in devm_kzalloc() spi/pxa2xx: use GFP_ATOMIC in sg table allocation spi: s3c64xx: Fix pm_runtime_get_sync() return value check
Diffstat (limited to 'drivers')
3 files changed, 3 insertions, 3 deletions
diff --git a/drivers/spi/spi-pxa2xx-dma.c b/drivers/spi/spi-pxa2xx-dma.c
index c735c5a008a2..6427600b5bbe 100644
--- a/drivers/spi/spi-pxa2xx-dma.c
+++ b/drivers/spi/spi-pxa2xx-dma.c
@@ -59,7 +59,7 @@ static int pxa2xx_spi_map_dma_buffer(struct driver_data *drv_data,
int ret;
- ret = sg_alloc_table(sgt, nents, GFP_KERNEL);
+ ret = sg_alloc_table(sgt, nents, GFP_ATOMIC);
if (ret)
return ret;
diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
index f5d84d6f8222..48b396fced0a 100644
--- a/drivers/spi/spi-pxa2xx.c
+++ b/drivers/spi/spi-pxa2xx.c
@@ -1075,7 +1075,7 @@ pxa2xx_spi_acpi_get_pdata(struct platform_device *pdev)
acpi_bus_get_device(ACPI_HANDLE(&pdev->dev), &adev))
return NULL;
- pdata = devm_kzalloc(&pdev->dev, sizeof(*ssp), GFP_KERNEL);
+ pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
if (!pdata) {
"failed to allocate memory for platform data\n");
diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index 5000586cb98d..71cc3e6ef47c 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -444,7 +444,7 @@ static int s3c64xx_spi_prepare_transfer(struct spi_master *spi)
ret = pm_runtime_get_sync(&sdd->pdev->dev);
- if (ret != 0) {
+ if (ret < 0) {
dev_err(dev, "Failed to enable device: %d\n", ret);
goto out_tx;