input: touchscreen: Add NULL pointer check before dereference
A message that is not in the archive (sent off-list or not yet received): 20190901182309.GA5574@ahmlpt0706
Quoted 5 lines · Saiyam Doshi
In
sx8654_probefunction, if call todevice_get_match_data()return NULL, it dereferencesdriver_datafrom 'id'.To avoid NULL pointer dereference, add check to make sure 'id' is not NULL.
Any review / update on this?
-Saiyam
Hi Saiyam,
Quoted 8 lines · Saiyam Doshi
Quoted 5 lines · Saiyam Doshi
In
sx8654_probefunction, if call todevice_get_match_data()return NULL, it dereferencesdriver_datafrom 'id'.To avoid NULL pointer dereference, add check to make sure 'id' is not NULL.
Any review / update on this?
Can you please explain under what circumstances we can get NULL from device_get_match_data() in this driver?
Thanks.
Signature · 1 line
Dmitry