net/qede: fix crash when configure fails
authorTimothy Redaelli <tredaelli@redhat.com>
Fri, 9 Nov 2018 15:45:40 +0000 (16:45 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 13 Nov 2018 23:35:53 +0000 (00:35 +0100)
commit69d3e963e446be9c8d98638223589e8cdf44dd9e
tree6576ad3755a30d7c658975dc2714c67fdde04ad7
parent7d0bc2b159f14340e0dd839900c01da344337dc8
net/qede: fix crash when configure fails

Currently, if configuration fails (for example if a 100G card is used
with an odd number of RX/TX queues) QEDE crashes due to a null pointer
dereference.

This commit fixes it by checking that the pointer is not NULL before
using it.

Fixes: 7105b24f4bb8 ("net/qede: fix memory alloc for multiple port reconfig")
Cc: stable@dpdk.org
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: Rasesh Mody <rasesh.mody@cavium.com>
drivers/net/qede/qede_rxtx.c