| .. | .. |
|---|
| 357 | 357 | static void img_hash_dma_task(unsigned long d) |
|---|
| 358 | 358 | { |
|---|
| 359 | 359 | struct img_hash_dev *hdev = (struct img_hash_dev *)d; |
|---|
| 360 | | - struct img_hash_request_ctx *ctx = ahash_request_ctx(hdev->req); |
|---|
| 360 | + struct img_hash_request_ctx *ctx; |
|---|
| 361 | 361 | u8 *addr; |
|---|
| 362 | 362 | size_t nbytes, bleft, wsend, len, tbc; |
|---|
| 363 | 363 | struct scatterlist tsg; |
|---|
| 364 | 364 | |
|---|
| 365 | | - if (!hdev->req || !ctx->sg) |
|---|
| 365 | + if (!hdev->req) |
|---|
| 366 | + return; |
|---|
| 367 | + |
|---|
| 368 | + ctx = ahash_request_ctx(hdev->req); |
|---|
| 369 | + if (!ctx->sg) |
|---|
| 366 | 370 | return; |
|---|
| 367 | 371 | |
|---|
| 368 | 372 | addr = sg_virt(ctx->sg); |
|---|