summaryrefslogtreecommitdiffstats
path: root/drivers/misc/xilinx_sdfec.c
diff options
context:
space:
mode:
authorFabio M. De Francesco <fmdefrancesco@gmail.com>2022-09-01 17:44:07 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-09-09 10:22:36 +0200
commite01b08d7f6d36f20533b7510ea3af90756125f35 (patch)
tree6aac571db6ee0cda39f5ee20d319d6d4a768aea2 /drivers/misc/xilinx_sdfec.c
parentdd8dc442c1e3b1798fad61211f3b090523dd926d (diff)
downloadlinux-e01b08d7f6d36f20533b7510ea3af90756125f35.tar.gz
linux-e01b08d7f6d36f20533b7510ea3af90756125f35.tar.bz2
linux-e01b08d7f6d36f20533b7510ea3af90756125f35.zip
misc/xilinx_sdfec: Call kunmap() on pages mapped with kmap()
Pages in an array are mapped in a loop but, after the code is done with the virtual addresses, these pages are never unmapped. Therefore, call kunmap() to unmap pages[i]. Cc: "Venkataramanan, Anirudh" <anirudh.venkataramanan@intel.com> Cc: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20220901154408.23984-2-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/xilinx_sdfec.c')
-rw-r--r--drivers/misc/xilinx_sdfec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/misc/xilinx_sdfec.c b/drivers/misc/xilinx_sdfec.c
index d6e3c650bd11..4b1d82ae7312 100644
--- a/drivers/misc/xilinx_sdfec.c
+++ b/drivers/misc/xilinx_sdfec.c
@@ -645,6 +645,7 @@ static int xsdfec_table_write(struct xsdfec_dev *xsdfec, u32 offset,
reg++;
} while ((reg < len) &&
((reg * XSDFEC_REG_WIDTH_JUMP) % PAGE_SIZE));
+ kunmap(pages[i]);
unpin_user_page(pages[i]);
}
return 0;