From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Date: Fri, 10 Jul 2020 07:46:54 +0000 Subject: Re: [PATCH] scsi: virtio_scsi: Remove unnecessary condition checks Message-Id: List-Id: References: <8eb9a827-45f1-e71c-0cbf-1c29acd8e310@web.de> <58e3feb8-1ffb-f77f-cf3a-75222b3cd524@redhat.com> <9815ef2d-d0da-d197-49d7-83559d750ff1@web.de> In-Reply-To: <9815ef2d-d0da-d197-49d7-83559d750ff1@web.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: Markus Elfring , Xianting Tian , linux-scsi@vger.kernel.org, virtualization@lists.linux-foundation.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, "James E. J. Bottomley" , Jason Wang , "Martin K. Petersen" , "Michael S. Tsirkin" , Stefan Hajnoczi 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?idBf82040ee66db13525dc6f14b8559890b2f4c1c#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? No. >> 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”. s/loop/label/ sorry. Paolo