| .. | .. |
|---|
| 2819 | 2819 | |
|---|
| 2820 | 2820 | if (init_submitter(device)) { |
|---|
| 2821 | 2821 | err = ERR_NOMEM; |
|---|
| 2822 | | - goto out_idr_remove_vol; |
|---|
| 2822 | + goto out_idr_remove_from_resource; |
|---|
| 2823 | 2823 | } |
|---|
| 2824 | 2824 | |
|---|
| 2825 | 2825 | add_disk(disk); |
|---|
| .. | .. |
|---|
| 2836 | 2836 | drbd_debugfs_device_add(device); |
|---|
| 2837 | 2837 | return NO_ERROR; |
|---|
| 2838 | 2838 | |
|---|
| 2839 | | -out_idr_remove_vol: |
|---|
| 2840 | | - idr_remove(&connection->peer_devices, vnr); |
|---|
| 2841 | 2839 | out_idr_remove_from_resource: |
|---|
| 2842 | 2840 | for_each_connection_safe(connection, n, resource) { |
|---|
| 2843 | 2841 | peer_device = idr_remove(&connection->peer_devices, vnr); |
|---|