Skip to content
Commit c234af58 authored by Colin Ian King's avatar Colin Ian King Committed by David S. Miller
Browse files

net: hns: dereference ppe_cb->ppe_common_cb if it is non-null



ppe_cb->ppe_common_cb is being dereferenced before a null check is
being made on it.  If ppe_cb->ppe_common_cb is null then we end up
with a null pointer dereference when assigning dsaf_dev.  Fix this
by moving the initialisation of dsaf_dev once we know
ppe_cb->ppe_common_cb is OK to dereference.

Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Acked-by: default avatarYisen Zhuang <yisen.zhuang@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b628d611
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