lkml.org 
[lkml]   [2017]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 9/9] memstick: Delete an unnecessary check in msb_update_block()
From
Date
From: Markus Elfring <elfring@users.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@users.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
\
 
 \ /
  Last update: 2017-01-07 21:05    [W:0.053 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site