Actually, the end is like that:

END LOOP;
<< all_done >>
-- Deallocate the device
sys.dbms_backup_restore.deviceDeallocate;
END;