]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[linux] Fix error control flow in tap_probe()
authorMichael Brown <mcb30@ipxe.org>
Wed, 5 Jul 2023 13:46:41 +0000 (14:46 +0100)
committerMichael Brown <mcb30@ipxe.org>
Wed, 5 Jul 2023 13:47:13 +0000 (14:47 +0100)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/linux/tap.c

index ff1e08bdb31218cd08e3096dbfe0b2264bc0dbaa..9b52c20ab510a1f60b7c94d1471f2ce9fbe12e0a 100644 (file)
@@ -231,9 +231,9 @@ static int tap_probe(struct linux_device *device, struct linux_device_request *r
 
        return 0;
 
-err_settings:
        unregister_netdev(netdev);
 err_register:
+err_settings:
        netdev_nullify(netdev);
        netdev_put(netdev);
        return rc;