diff mbox series

scsi: remove redundant initialization of variable ret

Message ID 20200918090747.44645-1-jingxiangfeng@huawei.com
State New
Headers show
Series scsi: remove redundant initialization of variable ret | expand

Commit Message

Jing Xiangfeng Sept. 18, 2020, 9:07 a.m. UTC
The variable ret is being initialized with '-ENOMEM' that is
meaningless. So remove it.

Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
---
 drivers/scsi/arm/oak.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Finn Thain Sept. 19, 2020, 7:36 a.m. UTC | #1
On Fri, 18 Sep 2020, Jing Xiangfeng wrote:

> The variable ret is being initialized with '-ENOMEM' that is

> meaningless. So remove it.

> 


Acked-by: Finn Thain <fthain@telegraphics.com.au>
Martin K. Petersen Sept. 23, 2020, 12:29 a.m. UTC | #2
Jing,

> The variable ret is being initialized with '-ENOMEM' that is

> meaningless. So remove it.


Applied to 5.10/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering
Martin K. Petersen Sept. 30, 2020, 3:34 a.m. UTC | #3
On Fri, 18 Sep 2020 17:07:47 +0800, Jing Xiangfeng wrote:

> The variable ret is being initialized with '-ENOMEM' that is

> meaningless. So remove it.


Applied to 5.10/scsi-queue, thanks!

[1/1] scsi: oak: Remove redundant initialization of variable ret
      https://git.kernel.org/mkp/scsi/c/713a846884ce

-- 
Martin K. Petersen	Oracle Linux Engineering
diff mbox series

Patch

diff --git a/drivers/scsi/arm/oak.c b/drivers/scsi/arm/oak.c
index 7c9d361e91a9..78f33d57c3e8 100644
--- a/drivers/scsi/arm/oak.c
+++ b/drivers/scsi/arm/oak.c
@@ -120,7 +120,7 @@  static struct scsi_host_template oakscsi_template = {
 static int oakscsi_probe(struct expansion_card *ec, const struct ecard_id *id)
 {
 	struct Scsi_Host *host;
-	int ret = -ENOMEM;
+	int ret;
 
 	ret = ecard_request_resources(ec);
 	if (ret)