[PATCH 2/5] staging: netlogic: free_netdev while devm_request_ioremap fail

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

 



in probe if devm_request_ioremap fail, we are not freeing the
netdev which is allocated at the beginning.

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 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/netlogic/xlr_net.c b/drivers/staging/netlogic/xlr_net.c
index dd98cb1..e348915 100644
--- a/drivers/staging/netlogic/xlr_net.c
+++ b/drivers/staging/netlogic/xlr_net.c
@@ -1025,7 +1025,8 @@ static int xlr_net_probe(struct platform_device *pdev)
 	if (!ndev->base_addr) {
 		dev_err(&pdev->dev,
 				"devm_request_and_ioremap failed\n");
-		return -EBUSY;
+		ret = -EBUSY;
+		goto err_gmac;
 	}
 
 	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
-- 
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