Commit 072210c7 authored by Dongliang Mu's avatar Dongliang Mu Committed by Kalle Valo
Browse files

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: default avatarDongliang Mu <dzm91@hust.edu.cn>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230316133236.556198-3-dzm91@hust.edu.cn
parent daef0205
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -738,8 +738,11 @@ static void ray_release(struct pcmcia_device *link)

	del_timer_sync(&local->timer);

	if (local->sram)
		iounmap(local->sram);
	if (local->rmem)
		iounmap(local->rmem);
	if (local->amem)
		iounmap(local->amem);
	pcmcia_disable_device(link);