From: Vu Pham Date: Mon, 21 Oct 2013 21:48:54 +0000 (+0300) Subject: iser-target: check device before dereferencing its variable X-Git-Tag: upstream/snapshot3+hdmi~4104^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0a66614b937c4cfe98c68613259367bf402f368b;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git iser-target: check device before dereferencing its variable This patch changes isert_connect_release() to correctly check for the existence struct isert_device *device before checking for isert_device->use_frwr. Signed-off-by: Vu Pham Signed-off-by: Nicholas Bellinger --- diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c index 3591855..6df2350 100644 --- a/drivers/infiniband/ulp/isert/ib_isert.c +++ b/drivers/infiniband/ulp/isert/ib_isert.c @@ -594,7 +594,7 @@ isert_connect_release(struct isert_conn *isert_conn) pr_debug("Entering isert_connect_release(): >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n"); - if (device->use_frwr) + if (device && device->use_frwr) isert_conn_free_frwr_pool(isert_conn); if (isert_conn->conn_qp) {