lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPgLHd_vfuN7Uenprrc_230MbyR7hAg+D4NCSSKEfcGNDtbS_Q@mail.gmail.com>
Date:	Tue, 18 Jun 2013 17:53:16 +0800
From:	Wei Yongjun <weiyj.lk@...il.com>
To:	gregkh@...uxfoundation.org, ganesanr@...adcom.com,
	tushar.behera@...aro.org
Cc:	yongjun_wei@...ndmicro.com.cn, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH -next] Staging: netlogic: fix missing free_netdev() on error
 in xlr_net_probe()

From: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>

Fix missing free_netdev() before return from function xlr_net_probe()
in the devm_ioremap_resource() error handling case.

Signed-off-by: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
---
no compile test.
---
 drivers/staging/netlogic/xlr_net.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/netlogic/xlr_net.c b/drivers/staging/netlogic/xlr_net.c
index b529d79..2acde54 100644
--- a/drivers/staging/netlogic/xlr_net.c
+++ b/drivers/staging/netlogic/xlr_net.c
@@ -1023,9 +1023,9 @@ static int xlr_net_probe(struct platform_device *pdev)
 	ndev->base_addr = (unsigned long) devm_ioremap_resource
 		(&pdev->dev, res);
 	if (IS_ERR_VALUE(ndev->base_addr)) {
-		dev_err(&pdev->dev,
-				"devm_ioremap_resource failed\n");
-		return ndev->base_addr;
+		dev_err(&pdev->dev, "devm_ioremap_resource failed\n");
+		err = ndev->base_addr;
+		goto err_gmac;
 	}
 
 	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ