Function return type does not match operand type of return inst!

This is a verifier check.But i am not getting how to resolve this.Do i need to change the function return type or some thing else.

ValueToValueMapTy VMap;
BasicBlock *clonedBlock =CloneBasicBlock(bb, VMap, “.tr”, bb->getParent());
std::cout<<“clone done”<<“\n”;
TerminatorInst *merge_term=bb->getTerminator();
std::cout<<“got terminator”<<“\n”;
TerminatorInst *new_term=clonedBlock->getTerminator();
errs()<<“new terminator instuction in perf:”<<*new_term<<“\n”;
//Perform the ReMapping of Clonedinstructions
for (BasicBlock::iterator I = clonedBlock->begin(); I != clonedBlock->end(); ++I)
//Loop over all the operands of the instruction
for (unsigned op=0, E = I->getNumOperands(); op != E; ++op)
const Value *Op = I->getOperand(op);
//Get it out of the value map
Value *V = VMap[Op];
//If not in the value map, then its outside our trace so ignore
if(V != 0)
std::cout<<“set terminator”<<“\n”;

this is my pass

This seems to be assuming that all basic block terminators will be an
unconditional branch. Judging by the error message, you're applying it
to one with a ret instead and converting it to "ret label %clonedBB".