net/bnxt: handle ring cleanup in case of error
authorRahul Gupta <rahul.gupta@broadcom.com>
Wed, 2 Oct 2019 23:25:52 +0000 (16:25 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 8 Oct 2019 10:14:31 +0000 (12:14 +0200)
commit4cfbb0da7c3d8abd8172727dcf8139c059c8dfd0
treeb958e35295dfecaef80e3f921cdfb091cd1fb9e1
parent40724480038911ecc3b1c7a2b5a57ecc3e793ffd
net/bnxt: handle ring cleanup in case of error

Initialize all rings to INVALID_HW_RING_ID.
This can be used to determine the rings to free if allocation fails.

Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
drivers/net/bnxt/bnxt_ring.c