lkml.org 
[lkml]   [2020]   [Jul]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] scsi: virtio_scsi: Remove unnecessary condition checks
From
Date
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
> of a few statements can be avoided according to a previous
> null pointer check?

The point of the patch is precisely to simplify the code, executing a
couple more instruction is not an issue.

Paolo

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