Skip to content
Commit f0115368 authored by Michael Chan's avatar Michael Chan Committed by Paul Gortmaker
Browse files

bnxt_en: Return error when allocating zero size context memory.

commit bbf211b1 upstream.

bnxt_alloc_ctx_pg_tbls() should return error when the memory size of the
context memory to set up is zero.  By returning success (0), the caller
may proceed normally and may crash later when it tries to set up the
memory.

Fixes: 08fe9d18

 ("bnxt_en: Add Level 2 context memory paging support.")
Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
parent 106d8aca
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment