Re: [PATCH] block: fix incorrect references to disk objects

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

 



On Mon, Oct 18, 2021 at 05:11:16PM +0800, Zqiang wrote:
> --- a/block/partitions/core.c
> +++ b/block/partitions/core.c
> @@ -424,6 +424,7 @@ static struct block_device *add_partition(struct gendisk *disk, int partno,
>  	device_del(pdev);
>  out_put:
>  	put_device(pdev);
> +	disk = NULL;
>  out_put_disk:
>  	put_disk(disk);
>  	return ERR_PTR(err);

Stylistic nitpick:  I think directly returning where this currently
clears disk would be a little easier to follow.



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux