]> www.infradead.org Git - users/willy/linux.git/commit
wifi: cw1200: Fix potential NULL dereference
authorLinus Walleij <linus.walleij@linaro.org>
Tue, 17 Dec 2024 12:55:48 +0000 (13:55 +0100)
committerKalle Valo <kvalo@kernel.org>
Wed, 18 Dec 2024 17:58:27 +0000 (19:58 +0200)
commit146b6057e1fd28fb1a38d300bf76a38dfba7f9fb
tree06426cab8ffbc2546b4244ce0f239281dba8ca73
parentcc0c53f4fac562efb3aca2bc493515e77642ae33
wifi: cw1200: Fix potential NULL dereference

A recent refactoring was identified by smatch to cause another potential NULL
dereference:

drivers/net/wireless/st/cw1200/cw1200_spi.c:440 cw1200_spi_disconnect() error: we previously assumed 'self' could be null (see line 433)

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202411271742.Xa7CNVh1-lkp@intel.com/
Fixes: 2719a9e7156c ("wifi: cw1200: Convert to GPIO descriptors")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/20241217-cw1200-fix-v1-1-911e6b5823ec@linaro.org
drivers/net/wireless/st/cw1200/cw1200_spi.c