diff --git a/drivers/crypto/ccp/psp-dev.c b/drivers/crypto/ccp/psp-dev.c index a62e8ae429800479e2234af27e9cfd186fdba283..a7b813c1056037278d7e3d3822f9c5f34daff60e 100644 --- a/drivers/crypto/ccp/psp-dev.c +++ b/drivers/crypto/ccp/psp-dev.c @@ -75,6 +75,9 @@ static irqreturn_t psp_irq_handler(int irq, void *data) /* Read the interrupt status: */ status = ioread32(psp->io_regs + psp->vdata->intsts_reg); + /* Clear the interrupt status by writing the same value we read. */ + iowrite32(status, psp->io_regs + psp->vdata->intsts_reg); + /* Check if it is command completion: */ if (!(status & PSP_CMD_COMPLETE)) goto done; @@ -87,9 +90,6 @@ static irqreturn_t psp_irq_handler(int irq, void *data) } done: - /* Clear the interrupt status by writing the same value we read. */ - iowrite32(status, psp->io_regs + psp->vdata->intsts_reg); - return IRQ_HANDLED; }