lkml.org 
[lkml]   [2020]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] scsi: virtio_scsi: Remove unnecessary condition checks
From
Date
>> 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;
>> + return -ENOMEM;
>> }
>
> Could be doable, but I don't see a particular benefit.

Can a bit more “compliance” (with the Linux coding style) matter here?


> Having a single error loop is an advantage by itself.

I do not see that a loop is involved in the implementation of the function “init”.


>> destroy_pool:
>> mempool_destroy(virtscsi_cmd_pool);
>> virtscsi_cmd_pool = NULL;
>> destroy_cache:
>> kmem_cache_destroy(virtscsi_cmd_cache);
>> virtscsi_cmd_cache = NULL;
>> return ret;
>
> ... while there's no advantage in this.

I propose again to improve the affected exception handling another bit
by using appropriate labels.
Will further software improvements be achieved by a corresponding patch series?

Regards,
Markus

\
 
 \ /
  Last update: 2020-07-10 09:41    [W:0.062 / U:1.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site