Patch "net: mdio-ipq4019: add missing error check" has been added to the 5.15-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

    net: mdio-ipq4019: add missing error check

to the 5.15-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:
     net-mdio-ipq4019-add-missing-error-check.patch
and it can be found in the queue-5.15 subdirectory.

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



commit c5c0523d6f2c14020ad30e08f6b873e205b9b4c8
Author: Rosen Penev <rosenp@xxxxxxxxx>
Date:   Thu Nov 21 11:31:52 2024 -0800

    net: mdio-ipq4019: add missing error check
    
    [ Upstream commit 9cc8d0ecdd2aad42e377e971e3bb114339df609e ]
    
    If an optional resource is found but fails to remap, return on failure.
    Avoids any potential problems when using the iomapped resource as the
    assumption is that it's available.
    
    Fixes: 23a890d493e3 ("net: mdio: Add the reset function for IPQ MDIO driver")
    Signed-off-by: Rosen Penev <rosenp@xxxxxxxxx>
    Reviewed-by: Andrew Lunn <andrew@xxxxxxx>
    Link: https://patch.msgid.link/20241121193152.8966-1-rosenp@xxxxxxxxx
    Signed-off-by: Paolo Abeni <pabeni@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/mdio/mdio-ipq4019.c b/drivers/net/mdio/mdio-ipq4019.c
index 4eba5a91075c0..da5dc854b6ca6 100644
--- a/drivers/net/mdio/mdio-ipq4019.c
+++ b/drivers/net/mdio/mdio-ipq4019.c
@@ -231,8 +231,11 @@ static int ipq4019_mdio_probe(struct platform_device *pdev)
 	/* The platform resource is provided on the chipset IPQ5018 */
 	/* This resource is optional */
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-	if (res)
+	if (res) {
 		priv->eth_ldo_rdy = devm_ioremap_resource(&pdev->dev, res);
+		if (IS_ERR(priv->eth_ldo_rdy))
+			return PTR_ERR(priv->eth_ldo_rdy);
+	}
 
 	bus->name = "ipq4019_mdio";
 	bus->read = ipq4019_mdio_read;




[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