]> www.infradead.org Git - users/jedix/linux-maple.git/commit
Input: wistron_btns - use kmemdup_array instead of kmemdup for multiple allocation
authorShen Lichuan <shenlichuan@vivo.com>
Mon, 26 Aug 2024 04:52:53 +0000 (12:52 +0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 26 Aug 2024 17:22:00 +0000 (10:22 -0700)
commitb7ffc98a6a55bf93021a5dcb88a7682ae6cb0177
tree4a1d2053cea4b01986c4a64f537e9254938845d6
parent6994d8b84bfd71431bfccb5baf84a827086d48a5
Input: wistron_btns - use kmemdup_array instead of kmemdup for multiple allocation

Let the kmemdup_array() take care about multiplication
and possible overflows.

Using kmemdup_array() is more appropriate and makes the code
easier to audit.

Signed-off-by: Shen Lichuan <shenlichuan@vivo.com>
Link: https://lore.kernel.org/r/20240826045253.3503-1-shenlichuan@vivo.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/wistron_btns.c