* [bug report] drivers: net: xgene: Add backward compatibility
@ 2016-08-03 10:39 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2016-08-03 10:39 UTC (permalink / raw)
To: isubramanian; +Cc: linux-acpi
Hello Iyappan Subramanian,
The patch 8089a96f601b: "drivers: net: xgene: Add backward
compatibility" from Jul 25, 2016, leads to the following static
checker warning:
drivers/net/ethernet/apm/xgene/xgene_enet_hw.c:744 acpi_phy_find_device()
warn: passing negative value to 'ACPI_FAILURE((-71))'
drivers/net/ethernet/apm/xgene/xgene_enet_hw.c
735 static struct acpi_device *acpi_phy_find_device(struct device *dev)
736 {
737 struct acpi_reference_args args;
738 struct fwnode_handle *fw_node;
739 int status;
740
741 fw_node = acpi_fwnode_handle(ACPI_COMPANION(dev));
742 status = acpi_node_get_property_reference(fw_node, "phy-handle", 0,
743 &args);
acpi_node_get_property_reference() returns normal kernel error codes,
not ACPI error codes. It doesn't cause a runtime problem but it's
probably should just be "if (status) {".
744 if (ACPI_FAILURE(status)) {
745 dev_dbg(dev, "No matching phy in ACPI table\n");
746 return NULL;
747 }
748
749 return args.adev;
750 }
regards,
dan carpenter
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-08-03 10:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-03 10:39 [bug report] drivers: net: xgene: Add backward compatibility Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox