Explorar o código

vinput: Remove redundant memset call

Remove redundant memset calls as memory allocated with kzalloc is
already zeroed due to the presence of the __GFP_ZERO gfp flag.
Kuan-Wei Chiu hai 11 meses
pai
achega
1e26743c30
Modificáronse 1 ficheiros con 0 adicións e 2 borrados
  1. 0 2
      examples/vinput.c

+ 0 - 2
examples/vinput.c

@@ -179,8 +179,6 @@ static struct vinput *vinput_alloc_vdevice(void)
 
     try_module_get(THIS_MODULE);
 
-    memset(vinput, 0, sizeof(struct vinput));
-
     spin_lock_init(&vinput->lock);
 
     spin_lock(&vinput_lock);