Skip to contentSkip to conversation

sed-opal: Remove unnecessary ‘0’ values from err

PATCH Applied Li zeming 2 participants 2 messages Mar 6, 2024

Subsystems (2)
lore
Share & tools
lore

Li zeming

author
#0 lore raw

PATCH 1/1 sed-opal: Remove unnecessary ‘0’ values from err

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

---
 block/sed-opal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
block/sed-opal.c +1 -1
index e5b069dde905e..b6887920a84e9 100644
@@ -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)
Signature · 1 line
2.18.2
maintainer Applied
#1 lore raw

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

Quoted 3 lines · Li zeming

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,

Signature · 1 line
Jens Axboe