]> git.baikalelectronics.ru Git - kernel.git/commitdiff
s390/qeth: indicate error when netdev allocation fails
authorJulian Wiedmann <jwi@linux.ibm.com>
Wed, 12 Sep 2018 13:31:32 +0000 (15:31 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 12 Sep 2018 20:12:51 +0000 (13:12 -0700)
Bailing out on allocation error is nice, but we also need to tell the
ccwgroup core that creating the qeth groupdev failed.

Fixes: 3b744262a0fa ("s390/qeth: allocate netdevice early")
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/qeth_core_main.c

index 49f64eb3eab0f759d06a5e3edff6550a06d8af40..6b24face21d5587266803d60b0630d19b5684501 100644 (file)
@@ -5768,8 +5768,10 @@ static int qeth_core_probe_device(struct ccwgroup_device *gdev)
        qeth_update_from_chp_desc(card);
 
        card->dev = qeth_alloc_netdev(card);
-       if (!card->dev)
+       if (!card->dev) {
+               rc = -ENOMEM;
                goto err_card;
+       }
 
        qeth_determine_capabilities(card);
        enforced_disc = qeth_enforce_discipline(card);