static bool inject_hwpars_err;
static bool inject_prepare_err;
static bool inject_trigger_err;
+static bool inject_open_err;
static short fill_mode = FILL_MODE_PAT;
MODULE_PARM_DESC(inject_prepare_err, "Inject EINVAL error in the 'prepare' callback");
module_param(inject_trigger_err, bool, 0600);
MODULE_PARM_DESC(inject_trigger_err, "Inject EINVAL error in the 'trigger' callback");
+module_param(inject_open_err, bool, 0600);
+MODULE_PARM_DESC(inject_open_err, "Inject EBUSY error in the 'open' callback");
+
struct pcmtst {
struct snd_pcm *pcm;
struct snd_pcm_runtime *runtime = substream->runtime;
struct pcmtst_buf_iter *v_iter;
+ if (inject_open_err)
+ return -EBUSY;
+
v_iter = kzalloc(sizeof(*v_iter), GFP_KERNEL);
if (!v_iter)
return -ENOMEM;