IB/hns: Fix the bug when platform_get_resource() exec fail
authorLijun Ou <oulijun@huawei.com>
Tue, 20 Sep 2016 16:07:10 +0000 (17:07 +0100)
committerDoug Ledford <dledford@redhat.com>
Mon, 3 Oct 2016 15:43:15 +0000 (11:43 -0400)
commit3e413872b1832e1cf6de037ec01b2c4c992f0136
tree9df4ad7ef5c676ceda83b5074fe3c6b3c740b8f5
parent1fad5fab782c18a90865f61bff1bde3a0dba1678
IB/hns: Fix the bug when platform_get_resource() exec fail

This patch mainly fixes the bug with platform_get_resource().
It should return NULL when platform_get_resource() exec fail.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Reviewed-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/hns/hns_roce_pd.c