Re: [PATCH] block: Fix an error handling in add_partition

From: Christoph Hellwig
Date: Wed Jan 20 2021 - 05:30:37 EST

On Sun, Jan 17, 2021 at 04:50:17PM +0800, Dinghao Liu wrote:
> Once we have called device_initialize(), we should use put_device() to
> give up the reference on error, just like what we have done on failure
> of device_add().
> Signed-off-by: Dinghao Liu <dinghao.liu@xxxxxxxxxx>

Looks good,

Reviewed-by: Christoph Hellwig <hch@xxxxxx>