linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Zqiang <qiang.zhang1211@gmail.com>
Cc: axboe@kernel.dk, hch@lst.de, willy@infradead.org,
	sunhao.th@gmail.com, hch@infradead.org,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] block: fix incorrect references to disk objects
Date: Mon, 18 Oct 2021 12:12:50 +0200	[thread overview]
Message-ID: <20211018101250.GA6754@lst.de> (raw)
In-Reply-To: <20211018091116.16874-1-qiang.zhang1211@gmail.com>

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.

      reply	other threads:[~2021-10-18 10:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-18  9:11 [PATCH] block: fix incorrect references to disk objects Zqiang
2021-10-18 10:12 ` Christoph Hellwig [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211018101250.GA6754@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=hch@infradead.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=qiang.zhang1211@gmail.com \
    --cc=sunhao.th@gmail.com \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).