[bug report] drivers: net: xgene: Add backward compatibility

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux