On 10/07/20 09:40, Markus Elfring wrote:
>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/scsi/virtio_scsi.c?id=42f82040ee66db13525dc6f14b8559890b2f4c1c#n980
>>>
>>> if (!virtscsi_cmd_cache) {
>>> pr_err("kmem_cache_create() for virtscsi_cmd_cache
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/scsi/virtio_scsi.c?id=42f82040ee66db13525dc6f14b8559890b2f4c1c#n980
>>
>> if (!virtscsi_cmd_cache) {
>> pr_err("kmem_cache_create() for virtscsi_cmd_cache failed\n");
>> -goto error;
>>
On 10/07/20 08:32, Markus Elfring wrote:
+ mempool_destroy(virtscsi_cmd_pool);
+ virtscsi_cmd_pool = NULL;
+ kmem_cache_destroy(virtscsi_cmd_cache);
+ virtscsi_cmd_cache = NULL;
return ret;
}
>>>
>>> How do you think about to add a jump target so that the execu
>>> + mempool_destroy(virtscsi_cmd_pool);
>>> + virtscsi_cmd_pool = NULL;
>>> + kmem_cache_destroy(virtscsi_cmd_cache);
>>> + virtscsi_cmd_cache = NULL;
>>> return ret;
>>> }
>>
>> How do you think about to add a jump target so that the execution
>> of a few statements can be avoided a
>>> + mempool_destroy(virtscsi_cmd_pool);
>>> + virtscsi_cmd_pool = NULL;
>>> + kmem_cache_destroy(virtscsi_cmd_cache);
>>> + virtscsi_cmd_cache = NULL;
>>> return ret;
>>> }
>>
>> How do you think about to add a jump target so that the execution
>> of a few statements can be avoided a
On 09/07/20 19:16, Markus Elfring wrote:
>> +mempool_destroy(virtscsi_cmd_pool);
>> +virtscsi_cmd_pool = NULL;
>> +kmem_cache_destroy(virtscsi_cmd_cache);
>> +virtscsi_cmd_cache = NULL;
>> return ret;
>> }
>
> How do you think about to add a jump target so that the execution
> kmem_cache_destroy and mempool_destroy can correctly handle
> null pointer parameter, so there is no need to check if the
> parameter is null before calling kmem_cache_destroy and
> mempool_destroy.
Can another imperative wording be preferred for the change description?
…
> +++ b/drivers/scsi/
7 matches
Mail list logo