2024-03-06 10:03:32

by Li zeming

[permalink] [raw]
Subject: [PATCH] sed-opal: Remove unnecessary ‘0’ values from err

err is assigned first, so it does not need to initialize the assignment.

Signed-off-by: Li zeming <[email protected]>
---
block/sed-opal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/sed-opal.c b/block/sed-opal.c
index e5b069dde905e..b6887920a84e9 100644
--- a/block/sed-opal.c
+++ b/block/sed-opal.c
@@ -2153,7 +2153,7 @@ static int lock_unlock_locking_range(struct opal_dev *dev, void *data)
u8 lr_buffer[OPAL_UID_LENGTH];
struct opal_lock_unlock *lkul = data;
u8 read_locked = 1, write_locked = 1;
- int err = 0;
+ int err;

if (build_locking_range(lr_buffer, sizeof(lr_buffer),
lkul->session.opal_key.lr) < 0)
--
2.18.2



2024-03-06 15:36:11

by Jens Axboe

[permalink] [raw]
Subject: Re: [PATCH] sed-opal: Remove unnecessary ���0’ values from err


On Wed, 06 Mar 2024 18:02:16 +0800, Li zeming wrote:
> err is assigned first, so it does not need to initialize the assignment.
>
>

Applied, thanks!

[1/1] sed-opal: Remove unnecessary ‘0’ values from err
commit: 217fcc48074be4f526190675140a478ee795d90d

Best regards,
--
Jens Axboe