FAILED: patch "[PATCH] spi: mt7621: Disable clock in probe error path" failed to apply to 4.19-stable tree
Subsystems (4)
[email protected]
maintainerThe patch below does not apply to the 4.19-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 24f7033405abe195224ec793dbc3d7a27dec0b98 Mon Sep 17 00:00:00 2001
From: Lukas Wunner <[email protected]>
Date: Mon, 7 Dec 2020 09:17:13 +0100
Subject: [PATCH] spi: mt7621: Disable clock in probe error path
Commit 702b15cb9712 ("spi: mt7621: fix missing clk_disable_unprepare() on error in mt7621_spi_probe") sought to disable the SYS clock on probe errors, but only did so for 2 of 3 potentially failing calls: The clock needs to be disabled on failure of devm_spi_register_controller() as well.
Moreover, the commit purports to fix a bug in commit cbd66c626e16 ("spi:
mt7621: Move SPI driver out of staging") but in reality the bug has existed since the driver was first introduced.
drivers/spi/spi-mt7621.c +5 -1
@@ -382,7 +382,11 @@ static int mt7621_spi_probe(struct platform_device *pdev)return ret; } -return devm_spi_register_controller (&pdev->dev, master); + ret =devm_spi_register_controller (&pdev->dev, master); +if (ret) +clk_disable_unprepare (clk); + +return ret; }static int mt7621_spi_remove (struct platform_device *pdev)
Quoted 4 lines · On Mon, Dec 28, 2020 at 12:07:08PM +0100, [email protected] wrote:
The patch below does not apply to the 4.19-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
Here's the backport of 24f7033405ab to v4.19.192:
-- >8 --
From: Lukas Wunner <[email protected]>
Date: Mon, 7 Dec 2020 09:17:13 +0100
Subject: [PATCH] spi: mt7621: Disable clock in probe error path
commit 24f7033405abe195224ec793dbc3d7a27dec0b98 upstream.
Commit 702b15cb9712 ("spi: mt7621: fix missing clk_disable_unprepare() on error in mt7621_spi_probe") sought to disable the SYS clock on probe errors, but only did so for 2 of 3 potentially failing calls: The clock needs to be disabled on failure of spi_register_master() as well.
Moreover, the commit purports to fix a bug in commit cbd66c626e16 ("spi:
mt7621: Move SPI driver out of staging") but in reality the bug has existed since the driver was first introduced.
--- drivers/staging/mt7621-spi/spi-mt7621.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/staging/mt7621-spi/spi-mt7621.c +5 -1
@@ -487,7 +487,11 @@ static int mt7621_spi_probe(struct platform_device *pdev)mt7621_spi_reset (rs,0 ); -return spi_register_master (master); + ret =spi_register_master (master); +if (ret) +clk_disable_unprepare (clk); + +return ret; }static int mt7621_spi_remove (struct platform_device *pdev)
Signature · 1 line
2.31.1