]> git.baikalelectronics.ru Git - kernel.git/commitdiff
misc: lkdtm: fixed static variable initialization
authorParth Y Shah <sparth1292@gmail.com>
Mon, 6 Aug 2018 07:10:57 +0000 (12:40 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 12 Sep 2018 07:46:46 +0000 (09:46 +0200)
Resolved "ERROR: do not initialise statics to 0"

Signed-off-by: Parth Y Shah <sparth1292@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/lkdtm/usercopy.c

index 9725aed305bbadad773c260dee8139f49fc093ca..d8157b8d78c23aad51bba9e517582dd8ab3fe179 100644 (file)
@@ -18,7 +18,7 @@
  * hardened usercopy checks by added "unconst" to all the const copies,
  * and making sure "cache_size" isn't optimized into a const.
  */
-static volatile size_t unconst = 0;
+static volatile size_t unconst;
 static volatile size_t cache_size = 1024;
 static struct kmem_cache *whitelist_cache;