Re: HID: bpf: One function call less in call_hid_bpf_rdesc_fixup() after error detection

From: Markus Elfring
Date: Wed Dec 27 2023 - 03:20:21 EST


>> The kfree() function was called in one case by the
>> call_hid_bpf_rdesc_fixup() function during error handling
>> even if the passed data structure member contained a null pointer.
>> This issue was detected by using the Coccinelle software.
>
> It is totally OK to free a null pointer through kfree() and the ENOMEM
> case is an unlikely case, so I don't think the patch is necessary.

Would you ever like to avoid redundant data processing a bit more?

Regards,
Markus