diff options
author | Tim Sell <Timothy.Sell@unisys.com> | 2016-05-06 13:11:22 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-05-09 08:15:18 -0400 |
commit | 825157aedabc2b4c0cb3152012b00ea0bdcd6fac (patch) | |
tree | f498201e7d8bbe7a6e6e1795ccf699666b93acf4 /drivers/staging | |
parent | 73ba8afe33e22b4bae26098add458bed3e666bc2 (diff) |
staging: unisys: visorhba: main path needs to flow down the left margin
In del_scsipending_ent(), the error-path and main-path were switched, so
the error-path is handled like 'if (err) return;', and the main-path flows
down the left margin. This also allowed us to remove the initialization of
"sent".
Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/unisys/visorhba/visorhba_main.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/staging/unisys/visorhba/visorhba_main.c b/drivers/staging/unisys/visorhba/visorhba_main.c index 176bcc35ba0e..7a2c48943b84 100644 --- a/drivers/staging/unisys/visorhba/visorhba_main.c +++ b/drivers/staging/unisys/visorhba/visorhba_main.c | |||
@@ -235,16 +235,17 @@ static void *del_scsipending_ent(struct visorhba_devdata *devdata, | |||
235 | int del) | 235 | int del) |
236 | { | 236 | { |
237 | unsigned long flags; | 237 | unsigned long flags; |
238 | void *sent = NULL; | 238 | void *sent; |
239 | 239 | ||
240 | if (del < MAX_PENDING_REQUESTS) { | 240 | if (del >= MAX_PENDING_REQUESTS) |
241 | spin_lock_irqsave(&devdata->privlock, flags); | 241 | return NULL; |
242 | sent = devdata->pending[del].sent; | ||
243 | 242 | ||
244 | devdata->pending[del].cmdtype = 0; | 243 | spin_lock_irqsave(&devdata->privlock, flags); |
245 | devdata->pending[del].sent = NULL; | 244 | sent = devdata->pending[del].sent; |
246 | spin_unlock_irqrestore(&devdata->privlock, flags); | 245 | |
247 | } | 246 | devdata->pending[del].cmdtype = 0; |
247 | devdata->pending[del].sent = NULL; | ||
248 | spin_unlock_irqrestore(&devdata->privlock, flags); | ||
248 | 249 | ||
249 | return sent; | 250 | return sent; |
250 | } | 251 | } |