s390: ctcm: fix ctcm_new_device error return code
[linux-2.6-microblaze.git] / drivers / s390 / net / ctcm_main.c
index 7617d21..f63c5c8 100644 (file)
@@ -1595,6 +1595,7 @@ static int ctcm_new_device(struct ccwgroup_device *cgdev)
                if (priv->channel[direction] == NULL) {
                        if (direction == CTCM_WRITE)
                                channel_free(priv->channel[CTCM_READ]);
+                       result = -ENODEV;
                        goto out_dev;
                }
                priv->channel[direction]->netdev = dev;