Skip to content

Commit b3089af

Browse files
committed
ASoC: SOF: sof-client-dma-trace: Block the dtrace if the firmware has crashed
Do not allow the dma trace to be started if the firmware is in crashed state. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
1 parent 5c75bc5 commit b3089af

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

sound/soc/sof/sof-client-dma-trace.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,12 @@ static size_t sof_wait_trace_avail(struct sof_client_dev *cdev,
293293

294294
static int sof_dfsentry_trace_open(struct inode *inode, struct file *file)
295295
{
296+
struct sof_client_dev *cdev = inode->i_private;
296297
int ret;
297298

299+
if (sof_client_get_fw_state(cdev) == SOF_FW_CRASHED)
300+
return -ENODEV;
301+
298302
ret = debugfs_file_get(file->f_path.dentry);
299303
if (unlikely(ret))
300304
return ret;

0 commit comments

Comments
 (0)