devices/e100-2.6.24-ethercat.c
changeset 2589 2b9c78543663
parent 1506 41ca84fb6bb2
--- a/devices/e100-2.6.24-ethercat.c	Thu Sep 06 14:21:02 2012 +0200
+++ b/devices/e100-2.6.24-ethercat.c	Mon Nov 03 15:20:05 2014 +0100
@@ -2817,7 +2817,8 @@
 	// offer device to EtherCAT master module
 	nic->ecdev = ecdev_offer(netdev, e100_ec_poll, THIS_MODULE);
 	if (nic->ecdev) {
-		if (ecdev_open(nic->ecdev)) {
+		err = ecdev_open(nic->ecdev);
+		if (err) {
 			ecdev_withdraw(nic->ecdev);
 			goto err_out_free;
 		}
@@ -2965,7 +2966,7 @@
 
 	/* Similar to calling e100_down(), but avoids adpater I/O. */
 	netdev->stop(netdev);
-    
+
     if (!nic->ecdev) {
     	/* Detach; put netif into state similar to hotplug unplug. */
 	    napi_enable(&nic->napi);