[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <44ade3ec-9c63-d08b-4544-b0a48ac13594@users.sourceforge.net>
Date: Sat, 7 Jan 2017 21:04:54 +0100
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: Maxim Levitsky <maximlevitsky@...il.com>,
kernel-janitors@...r.kernel.org
Cc: LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH 9/9] memstick: Delete an unnecessary check in
msb_update_block()
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Sat, 7 Jan 2017 20:21:02 +0100
Further exception handling will only be performed after an error code
was set. Thus remove a redundant check for a local variable at the end.
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
drivers/memstick/core/ms_block.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/memstick/core/ms_block.c b/drivers/memstick/core/ms_block.c
index 861f6a76136d..013f317d566b 100644
--- a/drivers/memstick/core/ms_block.c
+++ b/drivers/memstick/core/ms_block.c
@@ -1154,10 +1154,8 @@ static int msb_update_block(struct msb_data *msb, u16 lba,
return 0;
}
out:
- if (error) {
- pr_err("block update error after %d tries, switching to r/o mode", try);
- msb->read_only = true;
- }
+ pr_err("block update error after %d tries, switching to r/o mode", try);
+ msb->read_only = true;
return error;
}
--
2.11.0
Powered by blists - more mailing lists