-
- Downloads
Input: mtk-pmic-keys: Fix null pointer dereference when no compatible data
In mtk_pmic_keys_probe function, the of_match_device function is
called to retrieve the compatible platform device info but its return
data pointer is not checked. It can lead to a null pointer deference
later when accessing the data field, if of_match_device returned a null
pointer. So, add a pointer check after calling of_match_device function
and return an EINVAL error in null case.
Signed-off-by:
Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
Please register or sign in to comment