devices/r8169-2.6.31-ethercat.c
branchstable-1.5
changeset 2582 87e502828b3f
parent 2421 bc2d4bf9cbe5
--- a/devices/r8169-2.6.31-ethercat.c	Mon Oct 27 14:55:50 2014 +0100
+++ b/devices/r8169-2.6.31-ethercat.c	Mon Oct 27 16:33:23 2014 +0100
@@ -2217,11 +2217,14 @@
 
 	rtl8169_init_phy(dev, tp);
 	device_set_wakeup_enable(&pdev->dev, tp->features & RTL_FEATURE_WOL);
-	if (tp->ecdev && ecdev_open(tp->ecdev)) {
-		ecdev_withdraw(tp->ecdev);
-		goto err_out_msi_5;
-	}
-
+
+	if (tp->ecdev) {
+		rc = ecdev_open(tp->ecdev);
+		if (rc) {
+			ecdev_withdraw(tp->ecdev);
+			goto err_out_msi_5;
+		}
+	}
 
 out:
 	return rc;