net/bnxt: fix dereference before null check
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 <818b6a3caba85cc3a76890be15484140b8e9f23b@broadcom.com>
Reviewed-by: Somnath Kotur <b8220280eb86080d22ca0cb32db0b374b9a89cc6@broadcom.com>
Reviewed-by: Ajit Khaparde <01965fbd61169dc18f3fb5e13de7f67d298f8924@broadcom.com>

john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk