mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 12:57:06 +09:00
crypto: rockchip: add async_req NULL check
Change-Id: Ie27402f25e0c0c8440f5e299694d91719514bc32 Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
This commit is contained in:
@@ -353,6 +353,8 @@ static void rk_complete_op(struct rk_crypto_dev *rk_dev, int err)
|
||||
|
||||
alg_ctx->ops.complete(rk_dev->async_req, err);
|
||||
|
||||
rk_dev->async_req = NULL;
|
||||
|
||||
tasklet_schedule(&rk_dev->queue_task);
|
||||
}
|
||||
|
||||
@@ -388,6 +390,11 @@ static void rk_crypto_queue_task_cb(unsigned long data)
|
||||
struct crypto_async_request *async_req, *backlog;
|
||||
unsigned long flags;
|
||||
|
||||
if (rk_dev->async_req) {
|
||||
dev_err(rk_dev->dev, "%s: Unexpected crypto paths.\n", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
rk_dev->err = 0;
|
||||
spin_lock_irqsave(&rk_dev->lock, flags);
|
||||
backlog = crypto_get_backlog(&rk_dev->queue);
|
||||
|
||||
Reference in New Issue
Block a user