diff options
author | Devendra Naga <devendra.aaru@gmail.com> | 2012-09-19 23:04:36 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-09-21 04:21:40 +0200 |
commit | 3cfc1590107a155218c97df0db3eb0a2bd7fda16 (patch) | |
tree | 6e71c5fd0b8f06b085ab1bc77ee252b3abc9dcd9 /drivers | |
parent | xfrm_user: don't copy esn replay window twice for new states (diff) | |
download | linux-3cfc1590107a155218c97df0db3eb0a2bd7fda16.tar.xz linux-3cfc1590107a155218c97df0db3eb0a2bd7fda16.zip |
at91ether: return PTR_ERR if call to clk_get fails
we are currently returning ENODEV, as the clk_get may give a exact
error code in its returned pointer, assign it to the ret by using the
PTR_ERR function, so that the subsequent goto label will jump to the
error path and clean the driver and return the error correctly.
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/cadence/at91_ether.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/cadence/at91_ether.c b/drivers/net/ethernet/cadence/at91_ether.c index 77884191a8c6..4e980a7886fb 100644 --- a/drivers/net/ethernet/cadence/at91_ether.c +++ b/drivers/net/ethernet/cadence/at91_ether.c @@ -1086,7 +1086,7 @@ static int __init at91ether_probe(struct platform_device *pdev) /* Clock */ lp->ether_clk = clk_get(&pdev->dev, "ether_clk"); if (IS_ERR(lp->ether_clk)) { - res = -ENODEV; + res = PTR_ERR(lp->ether_clk); goto err_ioumap; } clk_enable(lp->ether_clk); |