sed-opal: Remove unnecessary ‘0’ values from ret
authorLi kunyu <kunyu@nfschina.com>
Wed, 6 Mar 2024 10:06:59 +0000 (18:06 +0800)
committerJens Axboe <axboe@kernel.dk>
Wed, 6 Mar 2024 15:29:43 +0000 (08:29 -0700)
ret is assigned first, so it does not need to initialize the assignment.

Signed-off-by: Li kunyu <kunyu@nfschina.com>
Link: https://lore.kernel.org/r/20240306100659.106521-1-kunyu@nfschina.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/sed-opal.c

index b688792..f62b7ee 100644 (file)
@@ -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;