summaryrefslogtreecommitdiff
path: root/block/sed-opal.c
diff options
context:
space:
mode:
authorLi zeming <zeming@nfschina.com>2024-03-06 12:56:08 +0300
committerJens Axboe <axboe@kernel.dk>2024-03-06 18:29:31 +0300
commit147fe6133477b9654f0ede339ef9267425955e88 (patch)
tree5dea182e369466323f247d270f623359a9a0e667 /block/sed-opal.c
parentf8c7511db009d42e2c24e48eeb04e3f1b67ab209 (diff)
downloadlinux-147fe6133477b9654f0ede339ef9267425955e88.tar.xz
sed-opal: Remove unnecessary ‘0’ values from error
error is assigned first, so it does not need to initialize the assignment. Signed-off-by: Li zeming <zeming@nfschina.com> Link: https://lore.kernel.org/r/20240306095608.26839-1-zeming@nfschina.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/sed-opal.c')
-rw-r--r--block/sed-opal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/sed-opal.c b/block/sed-opal.c
index 3d9e9cd250bd..e5b069dde905 100644
--- a/block/sed-opal.c
+++ b/block/sed-opal.c
@@ -1208,7 +1208,7 @@ static int cmd_start(struct opal_dev *dev, const u8 *uid, const u8 *method)
static int start_opal_session_cont(struct opal_dev *dev)
{
u32 hsn, tsn;
- int error = 0;
+ int error;
error = parse_and_check_status(dev);
if (error)
@@ -1350,7 +1350,7 @@ static int get_active_key_cont(struct opal_dev *dev)
{
const char *activekey;
size_t keylen;
- int error = 0;
+ int error;
error = parse_and_check_status(dev);
if (error)