Input: atmel_mxt_ts - suspend/resume causes panic if input_dev fails to init
authorPan Xinhui <xinhuix.pan@intel.com>
Tue, 4 Aug 2015 23:53:04 +0000 (16:53 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 5 Aug 2015 00:03:53 +0000 (17:03 -0700)
commit50fabb02c7c08dace3562c05797a3c92591a9803
treebcda5afbd6d3414c2e01e5be0788813e3763ae60
parent146c6a662f6b16536581afc8ed4c11460301a82d
Input: atmel_mxt_ts - suspend/resume causes panic if input_dev fails to init

input_dev may be NULL if mxt_initialize_input_device fails. But pm ops is
still available and suspend/resume assume
input_dev is not NULL. To fix this issue, we add a check if (!input_dev).

Signed-off-by: Pan Xinhui <xinhuix.pan@intel.com>
Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/atmel_mxt_ts.c