input: touchscreen: Add NULL pointer check before dereference
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