Hi @Balachandar_H
Yes, you can square off your borrowed position before expiry. To do this, please ensure that the borrowed stocks are available in your Dhan portfolio.
Once available, you can go to Rental Portfolio > Borrowed section and initiate the Repay of the borrowed stocks.
After the repayment request is placed, we will initiate an early pay-in of the shares, which will help release the margin blocked against your borrowed position.
Do let us know if you have any further doubts.