diff options
| author | Christophe Jaillet <[email protected]> | 2017-02-10 20:17:19 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2017-02-14 03:24:31 +0000 |
| commit | e9ea828f62891ca91e3f80bf4a438f337d59977d (patch) | |
| tree | 7354e33c49e906b5fb9597607b68016e6be6342d | |
| parent | net: fs_enet: Fix an error handling path (diff) | |
| download | kernel-e9ea828f62891ca91e3f80bf4a438f337d59977d.tar.gz kernel-e9ea828f62891ca91e3f80bf4a438f337d59977d.zip | |
net: fs_enet: Simplify code
There is no need to use an intermediate variable to handle an error code
in this case.
Signed-off-by: Christophe JAILLET <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
| -rw-r--r-- | drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c b/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c index 5c6426756d11..753259091b22 100644 --- a/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c +++ b/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c @@ -964,11 +964,10 @@ static int fs_enet_probe(struct platform_device *ofdev) */ clk = devm_clk_get(&ofdev->dev, "per"); if (!IS_ERR(clk)) { - err = clk_prepare_enable(clk); - if (err) { - ret = err; + ret = clk_prepare_enable(clk); + if (ret) goto out_deregister_fixed_link; - } + fpi->clk_per = clk; } |
