--- a/devices/r8169-3.6-ethercat.c Mon Oct 27 14:55:50 2014 +0100
+++ b/devices/r8169-3.6-ethercat.c Mon Oct 27 16:33:23 2014 +0100
@@ -7104,11 +7104,15 @@
if (pci_dev_run_wake(pdev))
pm_runtime_put_noidle(&pdev->dev);
- netif_carrier_off(dev);
-
- if (tp->ecdev && ecdev_open(tp->ecdev)) {
- ecdev_withdraw(tp->ecdev);
- goto err_out_msi_4;
+ if (tp->ecdev) {
+ rc = ecdev_open(tp->ecdev);
+ if (rc) {
+ ecdev_withdraw(tp->ecdev);
+ goto err_out_msi_4;
+ }
+ }
+ else {
+ netif_carrier_off(dev);
}
out: