Message ID | 567EDFDF.5000801@users.sourceforge.net (mailing list archive) |
---|---|
State | Rejected |
Headers | show |
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system] Hi Markus, [auto build test WARNING on v4.4-rc6] [also build test WARNING on next-20151223] url: https://github.com/0day-ci/linux/commits/SF-Markus-Elfring/InfiniBand-ocrdma-Fine-tuning-for-some-function-implementations/20151227-025304 coccinelle warnings: (new ones prefixed by >>) >> drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:489:9-16: ERROR: PTR_ERR applied after initialization to constant on line 488 vim +489 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 482 static int ocrdma_alloc_ucontext_pd(struct ocrdma_dev *dev, 483 struct ocrdma_ucontext *uctx, 484 struct ib_udata *udata) 485 { 486 uctx->cntxt_pd = _ocrdma_alloc_pd(dev, uctx, udata); 487 if (IS_ERR(uctx->cntxt_pd)) { > 488 uctx->cntxt_pd = NULL; > 489 return PTR_ERR(uctx->cntxt_pd); 490 } 491 492 uctx->cntxt_pd->uctx = uctx; --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c index 583001b..374c839 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c @@ -483,19 +483,15 @@ static int ocrdma_alloc_ucontext_pd(struct ocrdma_dev *dev, struct ocrdma_ucontext *uctx, struct ib_udata *udata) { - int status = 0; - uctx->cntxt_pd = _ocrdma_alloc_pd(dev, uctx, udata); if (IS_ERR(uctx->cntxt_pd)) { - status = PTR_ERR(uctx->cntxt_pd); uctx->cntxt_pd = NULL; - goto err; + return PTR_ERR(uctx->cntxt_pd); } uctx->cntxt_pd->uctx = uctx; uctx->cntxt_pd->ibpd.device = &dev->ibdev; -err: - return status; + return 0; } static int ocrdma_dealloc_ucontext_pd(struct ocrdma_ucontext *uctx)