mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-07 10:24:01 -04:00
wifi: ray_cs: add sanity check on local->sram/rmem/amem
The ray_config uses ray_release as its unified error handling function. However, it does not know if local->sram/rmem/amem succeeds or not. Fix this by adding sanity check on local->sram/rmem/amem in the ray_relase. Signed-off-by: Dongliang Mu <dzm91@hust.edu.cn> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230316133236.556198-3-dzm91@hust.edu.cn
This commit is contained in:
@@ -738,9 +738,12 @@ static void ray_release(struct pcmcia_device *link)
|
||||
|
||||
del_timer_sync(&local->timer);
|
||||
|
||||
iounmap(local->sram);
|
||||
iounmap(local->rmem);
|
||||
iounmap(local->amem);
|
||||
if (local->sram)
|
||||
iounmap(local->sram);
|
||||
if (local->rmem)
|
||||
iounmap(local->rmem);
|
||||
if (local->amem)
|
||||
iounmap(local->amem);
|
||||
pcmcia_disable_device(link);
|
||||
|
||||
dev_dbg(&link->dev, "ray_release ending\n");
|
||||
|
||||
Reference in New Issue
Block a user