summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorLi kunyu <kunyu@nfschina.com>2024-03-06 18:14:44 +0800
committerJens Axboe <axboe@kernel.dk>2024-03-06 08:29:49 -0700
commit5f2ad31fbb18565645f121b413837f260748e963 (patch)
tree108cd21b6fbd1058ed773bdee4f2c999a263c830 /block
parent2449be8c8cfcbb24b3cd15d8b55c2c91041c847b (diff)
downloadlinux-stable-5f2ad31fbb18565645f121b413837f260748e963.tar.gz
linux-stable-5f2ad31fbb18565645f121b413837f260748e963.tar.bz2
linux-stable-5f2ad31fbb18565645f121b413837f260748e963.zip
sed-opal: Remove the ret variable from the function
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>
Diffstat (limited to 'block')
-rw-r--r--block/sed-opal.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/block/sed-opal.c b/block/sed-opal.c
index f62b7ee933f7..25fdbb7e14ae 100644
--- a/block/sed-opal.c
+++ b/block/sed-opal.c
@@ -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));