Skip to content
Commit 813cc94c authored by Tianyi Jing's avatar Tianyi Jing Committed by Guenter Roeck
Browse files

hwmon: (xgene) Fix ioremap and memremap leak



Smatch reports:

drivers/hwmon/xgene-hwmon.c:757 xgene_hwmon_probe() warn:
'ctx->pcc_comm_addr' from ioremap() not released on line: 757.

This is because in drivers/hwmon/xgene-hwmon.c:701 xgene_hwmon_probe(),
ioremap and memremap is not released, which may cause a leak.

To fix this, ioremap and memremap is modified to devm_ioremap and
devm_memremap.

Signed-off-by: default avatarTianyi Jing <jingfelix@hust.edu.cn>
Reviewed-by: default avatarDongliang Mu <dzm91@hust.edu.cn>
Link: https://lore.kernel.org/r/20230318143851.2191625-1-jingfelix@hust.edu.cn


[groeck: Fixed formatting and subject]
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 2315332e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment