From 1e26743c30eab7de59d341779dcd5159a9074154 Mon Sep 17 00:00:00 2001 From: Kuan-Wei Chiu Date: Thu, 9 May 2024 01:09:47 +0800 Subject: [PATCH] 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. --- examples/vinput.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/examples/vinput.c b/examples/vinput.c index cf4d8ea..d7d2d23 100644 --- a/examples/vinput.c +++ b/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);