From 207abc420d064d8eb3b4465b53cef828708bda0f Mon Sep 17 00:00:00 2001 From: Sebastian Hesselbarth Date: Wed, 10 Apr 2013 23:29:34 +0000 Subject: [PATCH] --- yaml --- r: 369207 b: refs/heads/master c: 727f957a3c24c97e228337e876c6c4b2733bdca3 h: refs/heads/master i: 369205: 63dd173af9af9abcc63e87ed5798465bf11fb306 369203: 9650b578188cb768b5251e33e39732ad045688cf 369199: d45bf13fde5513891ace77f11cc943b1ab6c903c v: v3 --- [refs] | 2 +- .../drivers/net/ethernet/marvell/mv643xx_eth.c | 17 ++++------------- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/[refs] b/[refs] index d0f60a98511d..c300b13625e6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 209224862cabf7a871d680c448148ef6376bf98b +refs/heads/master: 727f957a3c24c97e228337e876c6c4b2733bdca3 diff --git a/trunk/drivers/net/ethernet/marvell/mv643xx_eth.c b/trunk/drivers/net/ethernet/marvell/mv643xx_eth.c index bbe61041ddac..305038f48176 100644 --- a/trunk/drivers/net/ethernet/marvell/mv643xx_eth.c +++ b/trunk/drivers/net/ethernet/marvell/mv643xx_eth.c @@ -2547,25 +2547,22 @@ static int mv643xx_eth_shared_probe(struct platform_device *pdev) struct mv643xx_eth_shared_private *msp; const struct mbus_dram_target_info *dram; struct resource *res; - int ret; if (!mv643xx_eth_version_printed++) pr_notice("MV-643xx 10/100/1000 ethernet driver version %s\n", mv643xx_eth_driver_version); - ret = -EINVAL; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (res == NULL) - goto out; + return -EINVAL; - ret = -ENOMEM; - msp = kzalloc(sizeof(*msp), GFP_KERNEL); + msp = devm_kzalloc(&pdev->dev, sizeof(*msp), GFP_KERNEL); if (msp == NULL) - goto out; + return -ENOMEM; msp->base = ioremap(res->start, resource_size(res)); if (msp->base == NULL) - goto out_free; + return -ENOMEM; msp->clk = devm_clk_get(&pdev->dev, NULL); if (!IS_ERR(msp->clk)) @@ -2585,11 +2582,6 @@ static int mv643xx_eth_shared_probe(struct platform_device *pdev) platform_set_drvdata(pdev, msp); return 0; - -out_free: - kfree(msp); -out: - return ret; } static int mv643xx_eth_shared_remove(struct platform_device *pdev) @@ -2599,7 +2591,6 @@ static int mv643xx_eth_shared_remove(struct platform_device *pdev) iounmap(msp->base); if (!IS_ERR(msp->clk)) clk_disable_unprepare(msp->clk); - kfree(msp); return 0; }