]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
HID: amd_sfh: Add missing check for dma_alloc_coherent
authorJiasheng Jiang <jiasheng@iscas.ac.cn>
Tue, 20 Dec 2022 02:49:21 +0000 (10:49 +0800)
committerBenjamin Tissoires <benjamin.tissoires@redhat.com>
Tue, 20 Dec 2022 08:45:53 +0000 (09:45 +0100)
commit53ffa6a9f83b2170c60591da1ead8791d5a42e81
tree3b9ea9d3fd8b673d3ec11020d4090ad84e5dc664
parent0ee29814c6be17a924761d3712eb8ad63cfe13ac
HID: amd_sfh: Add missing check for dma_alloc_coherent

Add check for the return value of the dma_alloc_coherent since
it may return NULL pointer if allocation fails.

Fixes: 4b2c53d93a4b ("SFH:Transport Driver to add support of AMD Sensor Fusion Hub (SFH)")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Acked-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Link: https://lore.kernel.org/r/20221220024921.21992-1-jiasheng@iscas.ac.cn
drivers/hid/amd-sfh-hid/amd_sfh_client.c