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.14-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi

Pull spi fix from Mark Brown:
"A simple fix for mishandling of some clk_get_optional() return codes
in the OMAP driver, the problem was reported against stable kernels on
a few platforms after an earlier incomplete fix was backported"

* tag 'spi-fix-v6.14-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
spi: omap2-mcspi: Correctly handle devm_clk_get_optional() errors

+8 -3
+8 -3
drivers/spi/spi-omap2-mcspi.c
··· 1561 1561 } 1562 1562 1563 1563 mcspi->ref_clk = devm_clk_get_optional_enabled(&pdev->dev, NULL); 1564 - if (IS_ERR(mcspi->ref_clk)) 1565 - mcspi->ref_clk_hz = OMAP2_MCSPI_MAX_FREQ; 1566 - else 1564 + if (IS_ERR(mcspi->ref_clk)) { 1565 + status = PTR_ERR(mcspi->ref_clk); 1566 + dev_err_probe(&pdev->dev, status, "Failed to get ref_clk"); 1567 + goto free_ctlr; 1568 + } 1569 + if (mcspi->ref_clk) 1567 1570 mcspi->ref_clk_hz = clk_get_rate(mcspi->ref_clk); 1571 + else 1572 + mcspi->ref_clk_hz = OMAP2_MCSPI_MAX_FREQ; 1568 1573 ctlr->max_speed_hz = mcspi->ref_clk_hz; 1569 1574 ctlr->min_speed_hz = mcspi->ref_clk_hz >> 15; 1570 1575