Re: [PATCH 1/4] scsi: core: fix error handling of scsi_host_alloc
From: Bart Van Assche <bvanassche@acm.org>
Date: 2021-06-03 02:26:16
From: Bart Van Assche <bvanassche@acm.org>
Date: 2021-06-03 02:26:16
On 6/2/21 6:30 AM, Ming Lei wrote:
After device is initialized via device_initialize(), or its name is set via dev_set_name(), the device has to be freed via put_device(), otherwise device name will be leaked because it is allocated dynamically in dev_set_name().
dev_set_name() must be called after device_initialize() so I think the reference to dev_set_name() can be left out from the above sentence.
return shost; + fail:
Please leave a blank line above labels. Otherwise this patch looks good to me hence: Reviewed-by: Bart Van Assche <bvanassche@acm.org>