diff mbox

[1/1] omap-sham: backlog handling fix

Message ID 16ffeda30b634b3ee0c9b55220b30dd689c5d182.1293616613.git.dmitry.kasatkin@nokia.com (mailing list archive)
State Awaiting Upstream, archived
Headers show

Commit Message

Dmitry Kasatkin Dec. 29, 2010, 9:58 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
index eb988e7..2e71123 100644
--- a/drivers/crypto/omap-sham.c
+++ b/drivers/crypto/omap-sham.c
@@ -664,7 +664,7 @@  static void omap_sham_finish_req(struct ahash_request *req, int err)
 static int omap_sham_handle_queue(struct omap_sham_dev *dd,
 				  struct ahash_request *req)
 {
-	struct crypto_async_request *async_req, *backlog = 0;
+	struct crypto_async_request *async_req, *backlog;
 	struct omap_sham_reqctx *ctx;
 	struct ahash_request *prev_req;
 	unsigned long flags;
@@ -677,11 +677,10 @@  static int omap_sham_handle_queue(struct omap_sham_dev *dd,
 		spin_unlock_irqrestore(&dd->lock, flags);
 		return ret;
 	}
+	backlog = crypto_get_backlog(&dd->queue);
 	async_req = crypto_dequeue_request(&dd->queue);
-	if (async_req) {
+	if (async_req)
 		dd->flags |= FLAGS_BUSY;
-		backlog = crypto_get_backlog(&dd->queue);
-	}
 	spin_unlock_irqrestore(&dd->lock, flags);
 
 	if (!async_req)