OSDN Git Service

hwrng: amd - remove redundant initialization of variable err
authorColin Ian King <colin.king@canonical.com>
Thu, 29 Apr 2021 11:32:53 +0000 (12:32 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 14 May 2021 11:07:55 +0000 (19:07 +0800)
The variable err 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

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/char/hw_random/amd-rng.c

index 9959c76..d8d4ef5 100644 (file)
@@ -126,7 +126,7 @@ static struct hwrng amd_rng = {
 
 static int __init mod_init(void)
 {
-       int err = -ENODEV;
+       int err;
        struct pci_dev *pdev = NULL;
        const struct pci_device_id *ent;
        u32 pmbase;