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

2021-01-18 Thread Chaitanya Kulkarni
On 1/17/21 1:00 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(). > > Signed-off-by: Dinghao Liu Looks good. Reviewed-by: Chaitanya Kulkarni

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

2021-01-18 Thread Jan Kara
On Sun 17-01-21 16:53:42, 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 Looks good to me. You can add: Reviewed-by: Jan Kara

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

2021-01-17 Thread Dinghao Liu
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 --- Changelog: v2: - Refine commit message. v3: - Add '[v3]' to the title. --- block/partitions/core.c | 2