diff mbox

[12/27] drivers/net/ethernet/stmicro/stmmac: don't check resource with devm_ioremap_resource

Message ID 1374602524-3398-13-git-send-email-wsa@the-dreams.de
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Wolfram Sang July 23, 2013, 6:01 p.m. UTC
devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
Please apply via the subsystem-tree.

 drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c |    3 ---
 1 file changed, 3 deletions(-)

Comments

David Miller July 25, 2013, 6:59 a.m. UTC | #1
From: Wolfram Sang <wsa@the-dreams.de>
Date: Tue, 23 Jul 2013 20:01:45 +0200

> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.
> 
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index 03de76c..da8be6e 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -109,9 +109,6 @@  static int stmmac_pltfr_probe(struct platform_device *pdev)
 	const char *mac = NULL;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res)
-		return -ENODEV;
-
 	addr = devm_ioremap_resource(dev, res);
 	if (IS_ERR(addr))
 		return PTR_ERR(addr);