File tree Expand file tree Collapse file tree
drivers/input/touchscreen Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -418,8 +418,10 @@ static void mxt_debug_msg_enable(struct mxt_data *data)
418418
419419 data -> debug_msg_data = kcalloc (DEBUG_MSG_MAX ,
420420 data -> T5_msg_size , GFP_KERNEL );
421- if (!data -> debug_msg_data )
421+ if (!data -> debug_msg_data ) {
422+ mutex_unlock (& data -> debug_msg_lock );
422423 return ;
424+ }
423425
424426 data -> debug_v2_enabled = true;
425427 mutex_unlock (& data -> debug_msg_lock );
@@ -451,6 +453,7 @@ static void mxt_debug_msg_add(struct mxt_data *data, u8 *msg)
451453 mutex_lock (& data -> debug_msg_lock );
452454
453455 if (!data -> debug_msg_data ) {
456+ mutex_unlock (& data -> debug_msg_lock );
454457 dev_err (dev , "No buffer!\n" );
455458 return ;
456459 }
@@ -685,6 +688,9 @@ static int mxt_check_bootloader(struct mxt_data *data)
685688 u8 state ;
686689 int ret ;
687690
691+ if (!f )
692+ return - EINVAL ;
693+
688694 /* Handle interrupt after download/flash process */
689695 if (f -> pos >= f -> fw -> size ) {
690696 complete (& f -> flash_completion );
You can’t perform that action at this time.
0 commit comments