HID: Intel-thc-hid: Intel-thc: Add safety check for reading DMA buffer

[ Upstream commit a9a917998d ]

Add DMA buffer readiness check before reading DMA buffer to avoid
unexpected NULL pointer accessing.

Signed-off-by: Even Xu <even.xu@intel.com>
Tested-by: Rui Zhang <rui1.zhang@intel.com>
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Even Xu 2025-12-26 11:39:53 +08:00 • committed by Greg Kroah-Hartman
commit 1e84a807c9