Skip to content

Commit 6be06dc

Browse files
committed
Merge branch 'devel'
2 parents 9ee89b0 + ef2efaf commit 6be06dc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

switchtec.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,8 @@ static void mrpc_complete_cmd(struct switchtec_dev *stdev)
208208
stuser_set_state(stuser, MRPC_DONE);
209209
stuser->return_code = 0;
210210

211-
if (stuser->status != SWITCHTEC_MRPC_STATUS_DONE)
211+
if (stuser->status != SWITCHTEC_MRPC_STATUS_DONE &&
212+
stuser->status != SWITCHTEC_MRPC_STATUS_ERROR)
212213
goto out;
213214

214215
if (stdev->dma_mrpc)
@@ -568,7 +569,8 @@ static ssize_t switchtec_dev_read(struct file *filp, char __user *data,
568569
out:
569570
mutex_unlock(&stdev->mrpc_mutex);
570571

571-
if (stuser->status == SWITCHTEC_MRPC_STATUS_DONE)
572+
if (stuser->status == SWITCHTEC_MRPC_STATUS_DONE ||
573+
stuser->status == SWITCHTEC_MRPC_STATUS_ERROR)
572574
return size;
573575
else if (stuser->status == SWITCHTEC_MRPC_STATUS_INTERRUPTED)
574576
return -ENXIO;

0 commit comments

Comments
 (0)