Patch "spi: mt7621: Fix an error message in mt7621_spi_probe()" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    spi: mt7621: Fix an error message in mt7621_spi_probe()

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     spi-mt7621-fix-an-error-message-in-mt7621_spi_probe.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit c4e772c34e6075f6cf6803136a2e73382564c757
Author: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
Date:   Sat Aug 27 13:42:07 2022 +0200

    spi: mt7621: Fix an error message in mt7621_spi_probe()
    
    [ Upstream commit 2b2bf6b7faa9010fae10dc7de76627a3fdb525b3 ]
    
    'status' is known to be 0 at this point. The expected error code is
    PTR_ERR(clk).
    
    Switch to dev_err_probe() in order to display the expected error code (in a
    human readable way).
    This also filters -EPROBE_DEFER cases, should it happen.
    
    Fixes: 1ab7f2a43558 ("staging: mt7621-spi: add mt7621 support")
    Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
    Reviewed-by: Matthias Brugger <matthias.bgg@xxxxxxxxx>
    Link: https://lore.kernel.org/r/928f3fb507d53ba0774df27cea0bbba4b055993b.1661599671.git.christophe.jaillet@xxxxxxxxxx
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/spi/spi-mt7621.c b/drivers/spi/spi-mt7621.c
index b4b9b7309b5e9..351b0ef52bbc8 100644
--- a/drivers/spi/spi-mt7621.c
+++ b/drivers/spi/spi-mt7621.c
@@ -340,11 +340,9 @@ static int mt7621_spi_probe(struct platform_device *pdev)
 		return PTR_ERR(base);
 
 	clk = devm_clk_get(&pdev->dev, NULL);
-	if (IS_ERR(clk)) {
-		dev_err(&pdev->dev, "unable to get SYS clock, err=%d\n",
-			status);
-		return PTR_ERR(clk);
-	}
+	if (IS_ERR(clk))
+		return dev_err_probe(&pdev->dev, PTR_ERR(clk),
+				     "unable to get SYS clock\n");
 
 	status = clk_prepare_enable(clk);
 	if (status)




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux