devices/8139too-2.6.35-ethercat.c
branchstable-1.5
changeset 2582 87e502828b3f
parent 2421 bc2d4bf9cbe5
--- a/devices/8139too-2.6.35-ethercat.c	Mon Oct 27 14:55:50 2014 +0100
+++ b/devices/8139too-2.6.35-ethercat.c	Mon Oct 27 16:33:23 2014 +0100
@@ -1136,9 +1136,12 @@
 	if (rtl_chip_info[tp->chipset].flags & HasHltClk)
 		RTL_W8 (HltClk, 'H');	/* 'R' would leave the clock running. */
 
-	if (tp->ecdev && ecdev_open(tp->ecdev)) {
-		ecdev_withdraw(tp->ecdev);
-		goto err_out;
+	if (tp->ecdev) {
+		i = ecdev_open(tp->ecdev);
+		if (i) {
+			ecdev_withdraw(tp->ecdev);
+			goto err_out;
+		}
 	}
 
 	return 0;