iavf: fix double-release of rtnl_lock
authorJakub Kicinski <kuba@kernel.org>
Thu, 3 Dec 2020 02:18:06 +0000 (18:18 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Jan 2021 19:18:08 +0000 (20:18 +0100)
commite2572423ab92014d3194282e737e6972d2424b37
tree702897b2b9dfd0defb749bd5d75824e4ff70a5d8
parentd9dea80af65e8f6f77adcd573cbd7267e280e0ef
iavf: fix double-release of rtnl_lock

[ Upstream commit f1340265726e0edf8a8cef28e665b28ad6302ce9 ]

This code does not jump to exit on an error in iavf_lan_add_device(),
so the rtnl_unlock() from the normal path will follow.

Fixes: b66c7bc1cd4d ("iavf: Refactor init state machine")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/intel/iavf/iavf_main.c