提交 e9ea828f 编写于 作者: C Christophe Jaillet 提交者: David S. Miller

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: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 1f8f1e89
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册