sed-opal: Remove the ret variable from the function
authorLi kunyu <kunyu@nfschina.com>
Wed, 6 Mar 2024 10:14:44 +0000 (18:14 +0800)
committerJens Axboe <axboe@kernel.dk>
Wed, 6 Mar 2024 15:29:49 +0000 (08:29 -0700)
The ret variable in the function has not yet been effective and can be
removed.

Signed-off-by: Li kunyu <kunyu@nfschina.com>
Link: https://lore.kernel.org/r/20240306101444.1244-1-kunyu@nfschina.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/sed-opal.c

index f62b7ee933f7f4f47ee20158a689f192f9bdc69c..25fdbb7e14ae9fe6efe7bf3522ec3c73c792f9d8 100644 (file)
@@ -3108,10 +3108,9 @@ static int opal_read_table(struct opal_dev *dev,
                { read_table_data, rw_tbl },
                { end_opal_session, }
        };
-       int ret = 0;
 
        if (!rw_tbl->size)
-               return ret;
+               return 0;
 
        return execute_steps(dev, read_table_steps,
                             ARRAY_SIZE(read_table_steps));
@@ -3125,10 +3124,9 @@ static int opal_write_table(struct opal_dev *dev,
                { write_table_data, rw_tbl },
                { end_opal_session, }
        };
-       int ret = 0;
 
        if (!rw_tbl->size)
-               return ret;
+               return 0;
 
        return execute_steps(dev, write_table_steps,
                             ARRAY_SIZE(write_table_steps));