Skip to content
Commit 4cf65845 authored by Yunshui Jiang's avatar Yunshui Jiang Committed by Dmitry Torokhov
Browse files

Input: cs40l50-vibra - fix potential NULL dereference in cs40l50_upload_owt()



The cs40l50_upload_owt() function allocates memory via kmalloc()
without checking for allocation failure, which could lead to a
NULL pointer dereference.

Return -ENOMEM in case allocation fails.

Signed-off-by: default avatarYunshui Jiang <jiangyunshui@kylinos.cn>
Fixes: c38fe1bb ("Input: cs40l50 - Add support for the CS40L50 haptic driver")
Link: https://lore.kernel.org/r/20250704024010.2353841-1-jiangyunshui@kylinos.cn


Cc: stable@vger.kernel.org
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent a106b6a8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment