]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
HID: Intel-thc-hid: Intel-thc: fix dma_unmap_sg() nents value
authorThomas Fourier <fourier.thomas@gmail.com>
Wed, 3 Dec 2025 16:56:35 +0000 (17:56 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Jan 2026 15:35:19 +0000 (16:35 +0100)
commita5eeebb994bf6456d9bdc8af12d19c9ea38ed8b1
tree42f1bd6955acaa1838395f49edacdb0edc58efee
parent737f341080f4c7f3e2455b54042b8c2a30742f18
HID: Intel-thc-hid: Intel-thc: fix dma_unmap_sg() nents value

[ Upstream commit 0e13150c1a13a3a3d6184c24bfd080d5999945d1 ]

The `dma_unmap_sg()` functions should be called with the same nents as the
`dma_map_sg()`, not the value the map function returned.

Save the number of entries in struct thc_dma_configuration.

Fixes: a688404b2e20 ("HID: intel-thc-hid: intel-thc: Add THC DMA interfaces")
Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
Reviewed-by: Even Xu <even.xu@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hid/intel-thc-hid/intel-thc/intel-thc-dma.c
drivers/hid/intel-thc-hid/intel-thc/intel-thc-dma.h