Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit acac10fd authored by Mitko Haralanov's avatar Mitko Haralanov Committed by Doug Ledford
Browse files

staging/hfi1: Remove un-needed variable



There is no need to use a separate variable for a
return value and a label when returning right away
would do just as well.

Signed-off-by: default avatarMitko Haralanov <mitko.haralanov@intel.com>
Reviewed-by: default avatarIra Weiny <ira.weiny@intel.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent a86cd357
Loading
Loading
Loading
Loading
+4 −7
Original line number Original line Diff line number Diff line
@@ -1037,22 +1037,19 @@ static int allocate_ctxt(struct file *fp, struct hfi1_devdata *dd,
static int init_subctxts(struct hfi1_ctxtdata *uctxt,
static int init_subctxts(struct hfi1_ctxtdata *uctxt,
			 const struct hfi1_user_info *uinfo)
			 const struct hfi1_user_info *uinfo)
{
{
	int ret = 0;
	unsigned num_subctxts;
	unsigned num_subctxts;


	num_subctxts = uinfo->subctxt_cnt;
	num_subctxts = uinfo->subctxt_cnt;
	if (num_subctxts > HFI1_MAX_SHARED_CTXTS) {
	if (num_subctxts > HFI1_MAX_SHARED_CTXTS)
		ret = -EINVAL;
		return -EINVAL;
		goto bail;
	}


	uctxt->subctxt_cnt = uinfo->subctxt_cnt;
	uctxt->subctxt_cnt = uinfo->subctxt_cnt;
	uctxt->subctxt_id = uinfo->subctxt_id;
	uctxt->subctxt_id = uinfo->subctxt_id;
	uctxt->active_slaves = 1;
	uctxt->active_slaves = 1;
	uctxt->redirect_seq_cnt = 1;
	uctxt->redirect_seq_cnt = 1;
	set_bit(HFI1_CTXT_MASTER_UNINIT, &uctxt->event_flags);
	set_bit(HFI1_CTXT_MASTER_UNINIT, &uctxt->event_flags);
bail:

	return ret;
	return 0;
}
}


static int setup_subctxt(struct hfi1_ctxtdata *uctxt)
static int setup_subctxt(struct hfi1_ctxtdata *uctxt)