input: synaptics_dsx_2.6: fix issues raised by static analyzer
Fix issues raised by static analyzer:
1. initialize "retval" before being returned from the driver function.
2. Check return value of the function create_singlethread_workqueue()
and return -ENOMEM if it failed. If creation of the workqueue
failed, then both queue_work() and queue_delayed_work() calls will
later crash, as they expect the workqueue pointer to be a non-NULL
value. Also add clean-up code for this.
3. check return value of the snprintf() call as array 'buf' of size
16 may use index value(s) 16...20.
CRs-Fixed: 995687
Change-Id: I89d9f7cacbcf23de43a7e96556d1ac65911126d6
Signed-off-by:
Shantanu Jain <shjain@codeaurora.org>
Loading
Please register or sign in to comment