mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
net: ti: icssg-prueth: Omit a variable reassignment in prueth_netdev_init()
An error code was assigned to a variable and checked accordingly. This value was passed to a dev_err_probe() call in an if branch. This function is documented in the way that the same value is returned. Thus delete two redundant variable reassignments. The source code was transformed by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Link: https://patch.msgid.link/71f7daa3-d4f4-4753-aae8-67040fc8297d@web.de Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
committed by
Paolo Abeni
parent
d550d63d00
commit
e0665df8c5
@@ -1250,8 +1250,7 @@ static int prueth_netdev_init(struct prueth *prueth,
|
||||
} else if (of_phy_is_fixed_link(eth_node)) {
|
||||
ret = of_phy_register_fixed_link(eth_node);
|
||||
if (ret) {
|
||||
ret = dev_err_probe(prueth->dev, ret,
|
||||
"failed to register fixed-link phy\n");
|
||||
dev_err_probe(prueth->dev, ret, "failed to register fixed-link phy\n");
|
||||
goto free;
|
||||
}
|
||||
|
||||
|
||||
@@ -818,8 +818,7 @@ static int prueth_netdev_init(struct prueth *prueth,
|
||||
} else if (of_phy_is_fixed_link(eth_node)) {
|
||||
ret = of_phy_register_fixed_link(eth_node);
|
||||
if (ret) {
|
||||
ret = dev_err_probe(prueth->dev, ret,
|
||||
"failed to register fixed-link phy\n");
|
||||
dev_err_probe(prueth->dev, ret, "failed to register fixed-link phy\n");
|
||||
goto free;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user