Skip to contentSkip to conversation

sed-opal: Remove the ret variable from the function

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

Subsystems (2)
lore
Share & tools
lore

Li kunyu

author
#0 lore raw

PATCH 1/1 sed-opal: Remove the ret variable from the function

The ret variable in the function has not yet been effective and can be removed.

---
 block/sed-opal.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
block/sed-opal.c +2 -4
index f62b7ee933f7f..25fdbb7e14ae9 100644
@@ -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));
Signature · 1 line
2.18.2
maintainer Applied
#1 lore raw
Quoted 4 lines · Li kunyu

The ret variable in the function has not yet been effective and can be removed.

Applied, thanks!

[1/1] sed-opal: Remove the ret variable from the function

      commit: 5f2ad31fbb18565645f121b413837f260748e963

Best regards,

Signature · 1 line
Jens Axboe