MLK-20208-1 mxc IPUv3: device: Remove a piece of dead code in ipu_task_thread()
authorLiu Ying <victor.liu@nxp.com>
Tue, 26 Mar 2019 05:36:52 +0000 (13:36 +0800)
committerLeonard Crestez <leonard.crestez@nxp.com>
Thu, 2 May 2019 08:35:31 +0000 (11:35 +0300)
The check on !sp_tsk0 is unnecessary in ipu_task_thread(), because the
beforehand "list_del(&sp_tsk0->node);" within the context implies sp_tsk0
is not null, otherwise, we'll dereference a null pointer earlier.

Detected by CoverityScan, CID#17842 ("Logically dead code")

Signed-off-by: Liu Ying <victor.liu@nxp.com>
(cherry picked from commit 9ad5edd076d61bc8bb3a558e523cc7b31f2c3043)
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
Signed-off-by: Shrikant Bobade <Shrikant_Bobade@mentor.com>
(cherry picked from commit 2c4dd0cb989176b9ca71b7ee60e9cdb899f5f633)

drivers/mxc/ipu3/ipu_device.c

index 38fe397..aceb530 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright 2005-2015 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright 2019 NXP
  */
 
 /*
@@ -3301,10 +3302,6 @@ static int ipu_task_thread(void *argv)
                                /* let the parent thread do the first sp_task */
                                /* FIXME: ensure the correct sequence for split
                                        4size: 5/6->9/a*/
-                               if (!sp_tsk0)
-                                       dev_err(tsk->dev,
-                                       "ERR: no-0x%x,can not get split_tsk0\n",
-                                       tsk->task_no);
                                wake_up_interruptible(&thread_waitq);
                                get_res_do_task(sp_tsk0);
                                dev_dbg(sp_tsk0->dev,