Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'spi-fix-v6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi

Pull spi fixes from Mark Brown:
"A few small driver specific fixes, the most important being the
s3c64xx change which is likely to be hit during normal operation"

* tag 'spi-fix-v6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
spi: mchp-pci1xxx: Fix a possible null pointer dereference in pci1xxx_spi_probe
spi: spi-fsl-lpspi: remove redundant spi_controller_put call
spi: s3c64xx: Use DMA mode from fifo size

+10 -11
+6 -8
drivers/spi/spi-fsl-lpspi.c
··· 852 852 fsl_lpspi->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); 853 853 if (IS_ERR(fsl_lpspi->base)) { 854 854 ret = PTR_ERR(fsl_lpspi->base); 855 - goto out_controller_put; 855 + return ret; 856 856 } 857 857 fsl_lpspi->base_phys = res->start; 858 858 859 859 irq = platform_get_irq(pdev, 0); 860 860 if (irq < 0) { 861 861 ret = irq; 862 - goto out_controller_put; 862 + return ret; 863 863 } 864 864 865 865 ret = devm_request_irq(&pdev->dev, irq, fsl_lpspi_isr, 0, 866 866 dev_name(&pdev->dev), fsl_lpspi); 867 867 if (ret) { 868 868 dev_err(&pdev->dev, "can't get irq%d: %d\n", irq, ret); 869 - goto out_controller_put; 869 + return ret; 870 870 } 871 871 872 872 fsl_lpspi->clk_per = devm_clk_get(&pdev->dev, "per"); 873 873 if (IS_ERR(fsl_lpspi->clk_per)) { 874 874 ret = PTR_ERR(fsl_lpspi->clk_per); 875 - goto out_controller_put; 875 + return ret; 876 876 } 877 877 878 878 fsl_lpspi->clk_ipg = devm_clk_get(&pdev->dev, "ipg"); 879 879 if (IS_ERR(fsl_lpspi->clk_ipg)) { 880 880 ret = PTR_ERR(fsl_lpspi->clk_ipg); 881 - goto out_controller_put; 881 + return ret; 882 882 } 883 883 884 884 /* enable the clock */ 885 885 ret = fsl_lpspi_init_rpm(fsl_lpspi); 886 886 if (ret) 887 - goto out_controller_put; 887 + return ret; 888 888 889 889 ret = pm_runtime_get_sync(fsl_lpspi->dev); 890 890 if (ret < 0) { ··· 945 945 pm_runtime_dont_use_autosuspend(fsl_lpspi->dev); 946 946 pm_runtime_put_sync(fsl_lpspi->dev); 947 947 pm_runtime_disable(fsl_lpspi->dev); 948 - out_controller_put: 949 - spi_controller_put(controller); 950 948 951 949 return ret; 952 950 }
+2
drivers/spi/spi-pci1xxxx.c
··· 725 725 spi_bus->spi_int[iter] = devm_kzalloc(&pdev->dev, 726 726 sizeof(struct pci1xxxx_spi_internal), 727 727 GFP_KERNEL); 728 + if (!spi_bus->spi_int[iter]) 729 + return -ENOMEM; 728 730 spi_sub_ptr = spi_bus->spi_int[iter]; 729 731 spi_sub_ptr->spi_host = devm_spi_alloc_host(dev, sizeof(struct spi_controller)); 730 732 if (!spi_sub_ptr->spi_host)
+2 -3
drivers/spi/spi-s3c64xx.c
··· 430 430 struct s3c64xx_spi_driver_data *sdd = spi_controller_get_devdata(host); 431 431 432 432 if (sdd->rx_dma.ch && sdd->tx_dma.ch) 433 - return xfer->len > sdd->fifo_depth; 433 + return xfer->len >= sdd->fifo_depth; 434 434 435 435 return false; 436 436 } ··· 826 826 return status; 827 827 } 828 828 829 - if (!is_polling(sdd) && (xfer->len > fifo_len) && 829 + if (!is_polling(sdd) && xfer->len >= fifo_len && 830 830 sdd->rx_dma.ch && sdd->tx_dma.ch) { 831 831 use_dma = 1; 832 - 833 832 } else if (xfer->len >= fifo_len) { 834 833 tx_buf = xfer->tx_buf; 835 834 rx_buf = xfer->rx_buf;