1
0
Эх сурвалжийг харах

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 11 сар өмнө
parent
commit
1e26743c30
1 өөрчлөгдсөн 0 нэмэгдсэн , 2 устгасан
  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);