OSDN Git Service

pktcdvd: remove redundant initialization of variable ret
authorColin Ian King <colin.king@canonical.com>
Thu, 11 Jun 2020 14:30:14 +0000 (15:30 +0100)
committerJens Axboe <axboe@kernel.dk>
Thu, 11 Jun 2020 15:15:48 +0000 (09:15 -0600)
The variable ret is being initialized with a value that is never read
and it is being updated later with a new value.  The initialization is
redundant and can be removed.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Addresses-Coverity: ("Unused value")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/pktcdvd.c

index 0b944ac..27a33ad 100644 (file)
@@ -1613,7 +1613,7 @@ static noinline_for_stack int pkt_get_last_written(struct pktcdvd_device *pd,
        disc_information di;
        track_information ti;
        __u32 last_track;
-       int ret = -1;
+       int ret;
 
        ret = pkt_get_disc_info(pd, &di);
        if (ret)