devices/8139too-2.6.13-ethercat.c
changeset 2589 2b9c78543663
parent 1363 11c0b2caa253
--- a/devices/8139too-2.6.13-ethercat.c	Thu Sep 06 14:21:02 2012 +0200
+++ b/devices/8139too-2.6.13-ethercat.c	Mon Nov 03 15:20:05 2014 +0100
@@ -1145,9 +1145,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;