Skip to content
Commit 8ad59b39 authored by Jean Delvare's avatar Jean Delvare Committed by Wolfram Sang
Browse files

i2c: piix4: Fix a memory leak in the EFCH MMIO support



The recently added support for EFCH MMIO regions introduced a memory
leak in that code path. The leak is caused by the fact that
release_resource() merely removes the resource from the tree but does
not free its memory. We need to call release_mem_region() instead,
which does free the memory. As a nice side effect, this brings back
some symmetry between the legacy and MMIO paths.

Signed-off-by: default avatarJean Delvare <jdelvare@suse.de>
Reported-by: default avatarYi Zhang <yi.zhang@redhat.com>
Tested-by: default avatarYi Zhang <yi.zhang@redhat.com>
Reviewed-by: default avatarTerry Bowman <terry.bowman@amd.com>
Tested-by: default avatarTerry Bowman <Terry.Bowman@amd.com>
Fixes: 7c148722

 ("i2c: piix4: Add EFCH MMIO support to region request and release")
Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
parent 03c765b0
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