iPXE - Open Source Boot Firmware

[rndis] Clean up error handling path in register_rndis()
authorMichael Brown <mcb30@ipxe.org>
Mon, 9 Jul 2018 09:35:57 +0000 (10:35 +0100)
committerMichael Brown <mcb30@ipxe.org>
Mon, 9 Jul 2018 09:35:57 +0000 (10:35 +0100)
commit05b979146ddb0b957354663a99c181357ad310b2
tree3bb92585ea569d47821feb0ce040ffd3c0ba3659
parent1c47eb186e7e38bde2a1db528cc3557b1b300386
[rndis] Clean up error handling path in register_rndis()

Avoid calling rndis_halt() and rndis->op->close() twice if the call to
register_netdev() fails.

Reported-by: Roman Kagan <rkagan@virtuozzo.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/net/rndis.c