net/bnxt: fix cleanup if a filter allocation fails
authorAjit Khaparde <ajit.khaparde@broadcom.com>
Tue, 10 Oct 2017 14:23:00 +0000 (09:23 -0500)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 12 Oct 2017 00:52:49 +0000 (01:52 +0100)
commitdc0bdeb4fa79826788124a4e230c38d1c32aff2d
tree866cb7973a5840b6e885764ae11e6965b6d971ed
parent9a761de8ea14ff80e06f03f37408e6b076e44c38
net/bnxt: fix cleanup if a filter allocation fails

We are not checking if a filter allocation succeeded.
And we end up accessing a null pointer after that.
Also invalidate the fw_l2_filter_id to prevent unnecessary
HW access and hence HWRM command failures during exit.

Fixes: 5ef3b79fdfe6 ("net/bnxt: support flow filter ops")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt_filter.c