Skip to content
Commit 0fc6a9c2 authored by Dongliang Mu's avatar Dongliang Mu Committed by Sasha Levin
Browse files

ipack: tpci200: fix memory leak in the tpci200_register

[ Upstream commit 50f05bd1 ]

The error handling code in tpci200_register does not free interface_regs
allocated by ioremap and the current version of error handling code is
problematic.

Fix this by refactoring the error handling code and free interface_regs
when necessary.

Fixes: 43986798

 ("ipack: add error handling for ioremap_nocache")
Cc: stable@vger.kernel.org
Reported-by: default avatarDongliang Mu <mudongliangabcd@gmail.com>
Signed-off-by: default avatarDongliang Mu <mudongliangabcd@gmail.com>
Link: https://lore.kernel.org/r/20210810100323.3938492-2-mudongliangabcd@gmail.com
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 280d66b3
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment