Skip to contentSkip to conversation

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

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 error

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

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

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

Quoted 3 lines · Li zeming

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

Applied, thanks!

[1/1] sed-opal: Remove unnecessary ‘0’ values from error

      commit: 147fe6133477b9654f0ede339ef9267425955e88

Best regards,

Signature · 1 line
Jens Axboe