diff options
author | Doug Ledford <dledford@redhat.com> | 2015-06-02 16:33:22 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2015-06-02 16:33:22 +0300 |
commit | b806ef3bbed39c95b45343bf0fd78802142f6017 (patch) | |
tree | eab4e67bef332c78c25d95e00b2d6ce3241f1aee /drivers/infiniband/hw/ocrdma | |
parent | 73cdaaeed10d91441cb946200b5dbbbeb143bace (diff) | |
parent | 1156256811e42908fd13c4cfcf32965d8b93f2a8 (diff) | |
download | linux-b806ef3bbed39c95b45343bf0fd78802142f6017.tar.xz |
Merge branch 'for-4.2-misc' into k.o/for-4.2
Diffstat (limited to 'drivers/infiniband/hw/ocrdma')
-rw-r--r-- | drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c index 877175563634..cf1f515efda8 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c @@ -375,7 +375,12 @@ static struct ocrdma_pd *_ocrdma_alloc_pd(struct ocrdma_dev *dev, if (dev->pd_mgr->pd_prealloc_valid) { status = ocrdma_get_pd_num(dev, pd); - return (status == 0) ? pd : ERR_PTR(status); + if (status == 0) { + return pd; + } else { + kfree(pd); + return ERR_PTR(status); + } } retry: |