2020-09-18 09:09:50

by Jing Xiangfeng

[permalink] [raw]
Subject: [PATCH] scsi: remove redundant initialization of variable ret

The variable ret is being initialized with '-ENOMEM' that is
meaningless. So remove it.

Signed-off-by: Jing Xiangfeng <[email protected]>
---
drivers/scsi/arm/oak.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

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)
--
2.17.1


2020-09-19 07:44:39

by Finn Thain

[permalink] [raw]
Subject: Re: [PATCH] scsi: remove redundant initialization of variable ret

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 <[email protected]>

2020-09-23 01:29:06

by Martin K. Petersen

[permalink] [raw]
Subject: Re: [PATCH] scsi: remove redundant initialization of variable ret


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

2020-09-30 03:40:03

by Martin K. Petersen

[permalink] [raw]
Subject: Re: [PATCH] scsi: remove redundant initialization of variable ret

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