Skip to contentSkip to conversation

s390: Reversed order of labels?

PATCH Martin Schwidefsky 1 participant 1 message Aug 22, 2009 1 message not in the archive s390

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 14 lines · On Sat, 22 Aug 2009 16:54:25 +0200 Roel Kluin <[email protected]> wrote:

Fix the order of goto labels.

---
Is this correct? Please review.

drivers/s390/char/tape_core.c +0 -0
index 1d420d9..7424d64 100644
@@ -358,11 +358,11 @@ tape_generic_online(struct tape_device *device,
 
 out_char:
 	tapechar_cleanup_device(device);

drivers/s390/char/tape_core.c tape_generic_online(struct tape_device *device, · line 368

Quoted 10 lines
drivers/s390/char/tape_core.c +2 -2
+out_minor:
+	tape_remove_minor(device);
 out_discipline:
 	device->discipline->cleanup_device(device);
 	device->discipline = NULL;
-out_minor:
-	tape_remove_minor(device);
 out:
 	module_put(discipline->owner);
 	return rc;

Seems correct to me, if tape_assign_minor fails (e.g. because of too many devices) then the function will try to remove the minor again which is not registered. Nothing bad happens because tape_alloc_device will initialize the list head but still. I'll add it to my patch queue.

Signature · 4 lines
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.