wifi: iwlwifi: mei: fix potential NULL-ptr deref after clone
authorJohannes Berg <johannes.berg@intel.com>
Sun, 30 Oct 2022 17:17:45 +0000 (19:17 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:32:10 +0000 (13:32 +0100)
commit0183b7c49cfdda91284505cbcdc7feecde48cbb9
tree846f60d6e403d192080b5f5514638cbc1c1ce157
parent57f6784d8831ac1091336b41ef3b80f6bae13191
wifi: iwlwifi: mei: fix potential NULL-ptr deref after clone

[ Upstream commit d3df49dda431f7ae4132a9a0ac25a5134c04e812 ]

If cloning the SKB fails, don't try to use it, but rather return
as if we should pass it.

Coverity CID: 1503456

Fixes: 2da4366f9e2c ("iwlwifi: mei: add the driver to allow cooperation with CSME")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20221030191011.0ce03ba99601.I87960b7cb0a3d16b9fd8d9144027e7e2587f5a58@changeid
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/intel/iwlwifi/mei/net.c