net/bnxt: fix dereference before null check
authorKalesh AP <kalesh-anakkur.purayil@broadcom.com>
Wed, 9 Oct 2019 08:46:17 +0000 (14:16 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 23 Oct 2019 14:43:09 +0000 (16:43 +0200)
commit5e592e8d4091da4ad1faadd9c3719bd4c245cca4
tree1d671d3d36adba3fa3d58edd8727ba8ed983124c
parent93b59ccf12ac89850fb77977bbf9aa0199b6acf5
net/bnxt: fix dereference before null check

This patch fixes potential null pointer access in bnxt_alloc_ag_data().
Fix to return an error if null check is true.

Fixes: daef48efe5e5 ("net/bnxt: support set MTU")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt_rxr.c