aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--block/sed-opal.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/block/sed-opal.c b/block/sed-opal.c
index 020bf3e28e38..1e18dca360fc 100644
--- a/block/sed-opal.c
+++ b/block/sed-opal.c
@@ -396,8 +396,11 @@ static int next(struct opal_dev *dev)
396 * session. Therefore we shouldn't attempt to terminate 396 * session. Therefore we shouldn't attempt to terminate
397 * a session, as one has not yet been created. 397 * a session, as one has not yet been created.
398 */ 398 */
399 if (state > 1) 399 if (state > 1) {
400 return end_opal_session_error(dev); 400 end_opal_session_error(dev);
401 return error;
402 }
403
401 } 404 }
402 state++; 405 state++;
403 } while (!error); 406 } while (!error);