gpio: use raw spinlock for gpio chip shadowed data
[platform/kernel/linux-rpi.git] / drivers / crypto / img-hash.c
index aa4c7b2..34b41cb 100644 (file)
@@ -358,12 +358,16 @@ static int img_hash_dma_init(struct img_hash_dev *hdev)
 static void img_hash_dma_task(unsigned long d)
 {
        struct img_hash_dev *hdev = (struct img_hash_dev *)d;
-       struct img_hash_request_ctx *ctx = ahash_request_ctx(hdev->req);
+       struct img_hash_request_ctx *ctx;
        u8 *addr;
        size_t nbytes, bleft, wsend, len, tbc;
        struct scatterlist tsg;
 
-       if (!hdev->req || !ctx->sg)
+       if (!hdev->req)
+               return;
+
+       ctx = ahash_request_ctx(hdev->req);
+       if (!ctx->sg)
                return;
 
        addr = sg_virt(ctx->sg);