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

index 9fa6ef2a5097fda2b15f357e7bef4a89529fb6dd..980bd46269a45c86ff0078e291eec0d7d50e2071 100644 (file)
@@ -300,9 +300,9 @@ static int af_packet_nic_probe ( struct linux_device *device,
 
        return 0;
 
-err_settings:
        unregister_netdev(netdev);
 err_register:
+err_settings:
        netdev_nullify(netdev);
        netdev_put(netdev);
        return rc;