The debt is not affected by the cosigner's bankruptcy.
If loan payments have been made in a timely manner for a number of years, the cosigner can investigate whether it is possible to be released from the guarantee on that basis.
Are you asking if the cosigner can discharge his responsibility to guarantee the loan?

