mirror of
https://github.com/fail0verflow/switch-linux.git
synced 2025-05-04 02:34:21 -04:00
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>
This commit is contained in:
parent
1f8f1e89e0
commit
e9ea828f62
1 changed files with 3 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue