ARM: 7136/1: pl330: Fix a race condition
[cascardo/linux.git] / arch / arm / common / pl330.c
index 97912fa..7129cfb 100644 (file)
@@ -1546,7 +1546,7 @@ int pl330_chan_ctrl(void *ch_id, enum pl330_chan_op op)
 
                /* Start the next */
        case PL330_OP_START:
-               if (!_start(thrd))
+               if (!_thrd_active(thrd) && !_start(thrd))
                        ret = -EIO;
                break;