pipeline: fixed possible null dereference

Added null check for possible null dereference.

Signed-off-by: Jakub Dabek <jakub.dabek@linux.intel.com>
This commit is contained in:
Jakub Dabek 2018-09-03 13:41:33 +02:00
parent ca704324ef
commit b6f9963782
1 changed files with 4 additions and 1 deletions

View File

@ -724,7 +724,10 @@ void pipeline_cache(struct pipeline *p, struct comp_dev *dev, int cmd)
} }
/* execute cache operation on pipeline itself */ /* execute cache operation on pipeline itself */
cache_cmd(p, sizeof(*p)); if (cache_cmd)
cache_cmd(p, sizeof(*p));
else
trace_pipe_error("ccN");
spin_unlock_irq(&p->lock, flags); spin_unlock_irq(&p->lock, flags);
} }