On 2/14/2018 8:31 PM, SF Markus Elfring wrote:
> From: Markus Elfring <[email protected]>
> Date: Wed, 14 Feb 2018 18:22:38 +0100
>
> Omit an extra message for a memory allocation failure in these functions.
>
> This issue was detected by using the Coccinelle software.
>
> Signed-off-by: Markus Elfring <[email protected]>
Reviewed-by: Horia Geantă <[email protected]>
though please consider the following
> @@ -689,10 +687,8 @@ static struct ahash_edesc *ahash_edesc_alloc(struct
> caam_hash_ctx *ctx,
> unsigned int sg_size = sg_num * sizeof(struct sec4_sg_entry);
>
> edesc = kzalloc(sizeof(*edesc) + sg_size, GFP_DMA | flags);
> - if (!edesc) {
> - dev_err(ctx->jrdev, "could not allocate extended descriptor\n");
> + if (!edesc)
> return NULL;
> - }
>
With this change, ctx parameter is no longer used in ahash_edesc_alloc().
Either here on in a different patch the function should be updated.
Thanks,
Horia