[PATCH 4/5] staging: netlogic: free up the irq pointer if mdio_register fail

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

 



mdio register can fail, and unregisters the mdio bus, but forgets
freeing up the irq variable which is allocated before

Cc: Ganesan Ramalingam <ganesanr@xxxxxxxxxxxx>
Cc: Jayachandran Chandrashekaran Nair <jchandra@xxxxxxxxxxxx>

Signed-off-by: Devendra Naga <devendra.aaru@xxxxxxxxx>
---
 drivers/staging/netlogic/xlr_net.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/netlogic/xlr_net.c b/drivers/staging/netlogic/xlr_net.c
index a228b9d..8aa6604 100644
--- a/drivers/staging/netlogic/xlr_net.c
+++ b/drivers/staging/netlogic/xlr_net.c
@@ -896,6 +896,7 @@ static int xlr_setup_mdio(struct xlr_net_priv *priv,
 
 	err = mdiobus_register(priv->mii_bus);
 	if (err) {
+		kfree(priv->mii_bus->irq);
 		mdiobus_free(priv->mii_bus);
 		pr_err("mdio bus registration failed\n");
 		return err;
-- 
1.8.1.4

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux