Message ID | 20180705225939.9741-1-bart.vanassche@wdc.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
> -----Original Message----- > From: Bart Van Assche [mailto:bart.vanassche@wdc.com] > Sent: Thursday, July 05, 2018 6:00 PM > To: Jason Gunthorpe <jgg@ziepe.ca> > Cc: Doug Ledford <dledford@redhat.com>; linux-rdma@vger.kernel.org; Bart > Van Assche <bart.vanassche@wdc.com>; Parav Pandit <parav@mellanox.com>; > Leon Romanovsky <leonro@mellanox.com> > Subject: [PATCH] RDMA/rxe: Remove unreachable code from rxe_create_ah() > > Fixes: 47ec38666210 ("RDMA: Convert drivers to use sgid_attr instead of > sgid_index") > Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> > Cc: Parav Pandit <parav@mellanox.com> > Cc: Leon Romanovsky <leonro@mellanox.com> > --- > drivers/infiniband/sw/rxe/rxe_verbs.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.c > b/drivers/infiniband/sw/rxe/rxe_verbs.c > index 1272903d0fe3..0d5f0ad3cd02 100644 > --- a/drivers/infiniband/sw/rxe/rxe_verbs.c > +++ b/drivers/infiniband/sw/rxe/rxe_verbs.c > @@ -255,8 +255,6 @@ static struct ib_ah *rxe_create_ah(struct ib_pd *ibpd, > rxe_init_av(rxe, attr, &ah->av); > return &ah->ibah; > > - rxe_drop_ref(pd); > - rxe_drop_ref(ah); > err1: > return ERR_PTR(err); > } RB: parav@mellanox.com > -- > 2.18.0 -- 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
> -----Original Message----- > From: Bart Van Assche [mailto:bart.vanassche@wdc.com] > Sent: Thursday, July 05, 2018 6:00 PM > To: Jason Gunthorpe <jgg@ziepe.ca> > Cc: Doug Ledford <dledford@redhat.com>; linux-rdma@vger.kernel.org; Bart > Van Assche <bart.vanassche@wdc.com>; Parav Pandit <parav@mellanox.com>; > Leon Romanovsky <leonro@mellanox.com> > Subject: [PATCH] RDMA/rxe: Remove unreachable code from rxe_create_ah() > > Fixes: 47ec38666210 ("RDMA: Convert drivers to use sgid_attr instead of > sgid_index") > Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> > Cc: Parav Pandit <parav@mellanox.com> > Cc: Leon Romanovsky <leonro@mellanox.com> > --- > drivers/infiniband/sw/rxe/rxe_verbs.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.c > b/drivers/infiniband/sw/rxe/rxe_verbs.c > index 1272903d0fe3..0d5f0ad3cd02 100644 > --- a/drivers/infiniband/sw/rxe/rxe_verbs.c > +++ b/drivers/infiniband/sw/rxe/rxe_verbs.c > @@ -255,8 +255,6 @@ static struct ib_ah *rxe_create_ah(struct ib_pd *ibpd, > rxe_init_av(rxe, attr, &ah->av); > return &ah->ibah; > > - rxe_drop_ref(pd); > - rxe_drop_ref(ah); > err1: > return ERR_PTR(err); > } With that err1 label is not needed. both failures can return ERR_PTR(err) and ERR_PTR(-ENOMEM); -- 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/sw/rxe/rxe_verbs.c b/drivers/infiniband/sw/rxe/rxe_verbs.c index 1272903d0fe3..0d5f0ad3cd02 100644 --- a/drivers/infiniband/sw/rxe/rxe_verbs.c +++ b/drivers/infiniband/sw/rxe/rxe_verbs.c @@ -255,8 +255,6 @@ static struct ib_ah *rxe_create_ah(struct ib_pd *ibpd, rxe_init_av(rxe, attr, &ah->av); return &ah->ibah; - rxe_drop_ref(pd); - rxe_drop_ref(ah); err1: return ERR_PTR(err); }
Fixes: 47ec38666210 ("RDMA: Convert drivers to use sgid_attr instead of sgid_index") Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> Cc: Parav Pandit <parav@mellanox.com> Cc: Leon Romanovsky <leonro@mellanox.com> --- drivers/infiniband/sw/rxe/rxe_verbs.c | 2 -- 1 file changed, 2 deletions(-)