Skip to content

Commit b9cd8ec

Browse files
committed
Merge branch 'master' into backport_ubuntu_16.04.2_4.4.0-62-generic
2 parents 3d895e4 + 6be06dc commit b9cd8ec

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
@@ -209,7 +209,8 @@ static void mrpc_complete_cmd(struct switchtec_dev *stdev)
209209
stuser_set_state(stuser, MRPC_DONE);
210210
stuser->return_code = 0;
211211

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

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

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

0 commit comments

Comments
 (0)