From: Dmitry Kasatkin Date: Thu, 2 Jun 2011 18:10:13 +0000 (+0300) Subject: crypto: omap-sham - do not schedule tasklet if there is no active requests X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=cd3f1d545c45489c88fbc71a82559664b8bf0bb2;p=linux-beck.git crypto: omap-sham - do not schedule tasklet if there is no active requests Signed-off-by: Dmitry Kasatkin Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c index 804c16bc2d61..6399a8f1938a 100644 --- a/drivers/crypto/omap-sham.c +++ b/drivers/crypto/omap-sham.c @@ -1085,6 +1085,11 @@ static irqreturn_t omap_sham_irq(int irq, void *dev_id) SHA_REG_CTRL_OUTPUT_READY); omap_sham_read(dd, SHA_REG_CTRL); + if (!test_bit(FLAGS_BUSY, &dd->flags)) { + dev_warn(dd->dev, "Interrupt when no active requests.\n"); + return IRQ_HANDLED; + } + set_bit(FLAGS_OUTPUT_READY, &dd->flags); tasklet_schedule(&dd->done_task);