lkml.org 
[lkml]   [2020]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] hwrng : cleanup initialization
Date
From: Tom Rix <trix@redhat.com>

clang static analysis reports this problem

intel-rng.c:333:2: warning: Assigned value is garbage or undefined
void __iomem *mem = mem;
^~~~~~~~~~~~~~~~~ ~~~

Because mem is assigned before it is used, this is not
a real problem. But the initialization is strange and not
needed, so remove it.

Signed-off-by: Tom Rix <trix@redhat.com>
---
drivers/char/hw_random/intel-rng.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/char/hw_random/intel-rng.c b/drivers/char/hw_random/intel-rng.c
index 9f205bd1acc0..eb7db27f9f19 100644
--- a/drivers/char/hw_random/intel-rng.c
+++ b/drivers/char/hw_random/intel-rng.c
@@ -330,7 +330,7 @@ static int __init mod_init(void)
int err = -ENODEV;
int i;
struct pci_dev *dev = NULL;
- void __iomem *mem = mem;
+ void __iomem *mem;
u8 hw_status;
struct intel_rng_hw *intel_rng_hw;

--
2.18.1
\
 
 \ /
  Last update: 2020-08-09 17:04    [W:0.038 / U:0.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site