Re: [PATCH] s390: Reversed order of labels?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 22 Aug 2009 16:54:25 +0200
Roel Kluin <roel.kluin@xxxxxxxxx> wrote:

> Fix the order of goto labels.
> 
> Signed-off-by: Roel Kluin <roel.kluin@xxxxxxxxx>
> ---
> Is this correct? Please review.
> 
> diff --git a/drivers/s390/char/tape_core.c b/drivers/s390/char/tape_core.c
> index 1d420d9..7424d64 100644
> --- a/drivers/s390/char/tape_core.c
> +++ b/drivers/s390/char/tape_core.c
> @@ -358,11 +358,11 @@ tape_generic_online(struct tape_device *device,
> 
>  out_char:
>  	tapechar_cleanup_device(device);
> +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.

-- 
blue skies,
   Martin.

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

--
To unsubscribe from this list: send the line "unsubscribe linux-s390" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux