Skip to content
Commit b352c346 authored by Xiaoke Wang's avatar Xiaoke Wang Committed by David S. Miller
Browse files

net: ll_temac: check the return value of devm_kmalloc()

devm_kmalloc() returns a pointer to allocated memory on success, NULL
on failure. While lp->indirect_lock is allocated by devm_kmalloc()
without proper check. It is better to check the value of it to
prevent potential wrong memory access.

Fixes: f14f5c11

 ("net: ll_temac: Support indirect_mutex share within TEMAC IP")
Signed-off-by: default avatarXiaoke Wang <xkernel.wang@foxmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a1cdec57
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