On 11/26/25 3:19 AM, Eslam Khafagy wrote:
Lastly, One question to max, at the beginning of the function dualshock4_get_calibration_data buf = kzalloc(DS4_FEATURE_REPORT_CALIBRATION_SIZE, GFP_KERNEL); if (! buf) { ret = -ENOMEM; goto transfer_failed; } if the allocation fails. can't we just return here
Never.
or do we need to go the the end of the function and do sanity checks at the end?
Correct.
Without the sanitisation code, the driver will divide by zero.
Max