Re: [PATCH] net: hns: dereference ppe_cb->ppe_common_cb if it is non-null

From: Yisen Zhuang
Date: Thu Aug 25 2016 - 20:42:57 EST

å 2016/8/25 14:51, Colin King åé:
> From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
> 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: Colin Ian King <colin.king@xxxxxxxxxxxxx>

Acked-by: Yisen Zhuang <yisen.zhuang@xxxxxxxxxx>