]> git.baikalelectronics.ru Git - kernel.git/commit
HID: intel_ish-hid: Add check for ishtp_dma_tx_map
authorJiasheng Jiang <jiasheng@iscas.ac.cn>
Tue, 22 Nov 2022 13:48:23 +0000 (21:48 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Feb 2023 06:52:35 +0000 (07:52 +0100)
commitb2ca079b058dc972d6e8b8341417d521e4167eda
tree89dc92a23c78b57ee2ba44169e3cb51ab6ea27ce
parent01eb57e64051b136d081892426e970e2dbe4210f
HID: intel_ish-hid: Add check for ishtp_dma_tx_map

[ Upstream commit b3d40c3ec3dc4ad78017de6c3a38979f57aaaab8 ]

As the kcalloc may return NULL pointer,
it should be better to check the ishtp_dma_tx_map
before use in order to avoid NULL pointer dereference.

Fixes: af9dc1454232 ("HID: intel_ish-hid: ISH Transport layer")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hid/intel-ish-hid/ishtp/dma-if.c