Skip to contentSkip to conversation

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

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 unnecessary ‘0’ values from ret

ret 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 b6887920a84e9..f62b7ee933f7f 100644
@@ -2576,7 +2576,7 @@ static int opal_get_discv(struct opal_dev *dev, struct opal_discovery *discv)
 	const struct opal_step discovery0_step = {
 		opal_discovery0, discv
 	};
-	int ret = 0;
+	int ret;
 
 	mutex_lock(&dev->dev_lock);
 	setup_opal_dev(dev);
@@ -3065,7 +3065,7 @@ bool opal_unlock_from_suspend(struct opal_dev *dev)
 {
 	struct opal_suspend_data *suspend;
 	bool was_failure = false;
-	int ret = 0;
+	int ret;
 
 	if (!dev)
 		return false;
Signature · 1 line
2.18.2
maintainer Applied
#1 lore raw

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

Quoted 3 lines · Li kunyu

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

Applied, thanks!

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

      commit: 2449be8c8cfcbb24b3cd15d8b55c2c91041c847b

Best regards,

Signature · 1 line
Jens Axboe