aboutsummaryrefslogtreecommitdiff
path: root/lib/test_fortify/write_overflow-memcpy.c
diff options
context:
space:
mode:
authorChristophe JAILLET <[email protected]>2024-05-26 17:05:59 +0200
committerJiri Kosina <[email protected]>2024-06-04 16:16:37 +0200
commit655a8a7684b897721f87c59798fd04d8b79f1b69 (patch)
treea234607f76e76193679210c5950c142b12f9db4f /lib/test_fortify/write_overflow-memcpy.c
parentce3af2ee95170b7d9e15fff6e500d67deab1e7b3 (diff)
HID: nintendo: Fix an error handling path in nintendo_hid_probe()
joycon_leds_create() has a ida_alloc() call. So if an error occurs after it, a corresponding ida_free() call is needed, as already done in the .remove function. This is not 100% perfect, because if ida_alloc() fails, then 'ctlr->player_id' will forced to be U32_MAX, and an error will be logged when ida_free() is called. Considering that this can't happen in real life, no special handling is done to handle it. Fixes: 5307de63d71d ("HID: nintendo: use ida for LED player id") Signed-off-by: Christophe JAILLET <[email protected]> Reviewed-by: Silvan Jegen <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-memcpy.c')
0 files changed, 0 insertions, 0 deletions