Skip to content

Commit

Permalink
net: phy: sfp: clean up a condition
Browse files Browse the repository at this point in the history
The acpi_node_get_property_reference() doesn't return ACPI error codes,
it just returns regular negative kernel error codes.  This patch doesn't
affect run time, it's just a clean up.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Ruslan Babayev <ruslan@babayev.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Jun 15, 2019
1 parent d5afa82 commit 1086ca3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/phy/sfp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1848,7 +1848,7 @@ static int sfp_probe(struct platform_device *pdev)
int ret;

ret = acpi_node_get_property_reference(fw, "i2c-bus", 0, &args);
if (ACPI_FAILURE(ret) || !is_acpi_device_node(args.fwnode)) {
if (ret || !is_acpi_device_node(args.fwnode)) {
dev_err(&pdev->dev, "missing 'i2c-bus' property\n");
return -ENODEV;
}
Expand Down

0 comments on commit 1086ca3

Please sign in to comment.