qlcnic: Avoid potential NULL pointer dereference
authorAditya Pakki <pakki001@umn.edu>
Thu, 14 Mar 2019 20:31:40 +0000 (15:31 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 4 May 2019 07:20:12 +0000 (09:20 +0200)
commitfc055dffa5751859f5043f1c1e91bfafe2c6a6e9
treeea53ff4ca795d3d0b790a58c34f29e0bcde6eb9a
parent98650508a9d08043583a0623a561b225e585001c
qlcnic: Avoid potential NULL pointer dereference

[ Upstream commit 5bf7295fe34a5251b1d241b9736af4697b590670 ]

netdev_alloc_skb can fail and return a NULL pointer which is
dereferenced without a check. The patch avoids such a scenario.

Signed-off-by: Aditya Pakki <pakki001@umn.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin (Microsoft) <sashal@kernel.org>
drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c