umem: remove redundant initialization of variable ret
authorColin Ian King <colin.king@canonical.com>
Thu, 11 Jun 2020 14:35:27 +0000 (15:35 +0100)
committerJens Axboe <axboe@kernel.dk>
Thu, 11 Jun 2020 15:16:17 +0000 (09:16 -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/umem.c

index d84e8a8..1e2aa5a 100644 (file)
@@ -784,7 +784,7 @@ static const struct block_device_operations mm_fops = {
 
 static int mm_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
 {
-       int ret = -ENODEV;
+       int ret;
        struct cardinfo *card = &cards[num_cards];
        unsigned char   mem_present;
        unsigned char   batt_status;