Skip to content

Commit 64a91b8

Browse files
committed
ASoC: SOF: sof-client-ipc-test: Block the test if the firmware has crashed
Do not allow the test to be started if the firmware is in crashed state. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
1 parent cba8df9 commit 64a91b8

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

sound/soc/sof/sof-client-ipc-test.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,12 @@ struct sof_ipc_client_data {
3333

3434
static int sof_ipc_dfsentry_open(struct inode *inode, struct file *file)
3535
{
36+
struct sof_client_dev *cdev = inode->i_private;
3637
int ret;
3738

39+
if (sof_client_get_fw_state(cdev) == SOF_FW_CRASHED)
40+
return -ENODEV;
41+
3842
ret = debugfs_file_get(file->f_path.dentry);
3943
if (unlikely(ret))
4044
return ret;

0 commit comments

Comments
 (0)