summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/freescale/fs_enet
diff options
context:
space:
mode:
authorChristophe Jaillet <christophe.jaillet@wanadoo.fr>2017-02-10 21:17:19 +0100
committerDavid S. Miller <davem@davemloft.net>2017-02-13 22:24:31 -0500
commite9ea828f62891ca91e3f80bf4a438f337d59977d (patch)
tree7354e33c49e906b5fb9597607b68016e6be6342d /drivers/net/ethernet/freescale/fs_enet
parent1f8f1e89e0183e9504dfa45e9b87c44cff2e66c6 (diff)
downloadlinux-e9ea828f62891ca91e3f80bf4a438f337d59977d.tar.bz2
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 <christophe.jaillet@wanadoo.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/freescale/fs_enet')
-rw-r--r--drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c7
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;
}