# Re: \[PATCH\] block: Fix an error handling in add\_partition

- From: Jens Axboe \<axboe@kernel.dk\>
- Date: 2021-01-25 04:37:17 
- List: linux-block
- Page: https://ratatoskr.run/linux-block/2021/01/6245947
- Thread: https://ratatoskr.run/linux-block/2021/01/6237571/t.md

```text
On 1/17/21 1:50 AM, 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().

Applied for 5.11, thanks.

-- 
Jens Axboe

```
