]> git.baikalelectronics.ru Git - kernel.git/commit
media: go7007: remove redundant initialization
authorPavel Skripkin <paskripkin@gmail.com>
Sun, 20 Jun 2021 19:45:42 +0000 (21:45 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Sep 2021 07:47:31 +0000 (09:47 +0200)
commit034b63424198ee01321e7e5d15203e68430a721c
tree6f9402146bb957c2fb48c8142d2c61be90ab1e29
parentb1cc6538323ce06f0d03c5c2a58d92c82af7116f
media: go7007: remove redundant initialization

[ Upstream commit 6f5885a7750545973bf1a942d2f0f129aef0aa06 ]

In go7007_alloc() kzalloc() is used for struct go7007
allocation. It means that there is no need in zeroing
any members, because kzalloc will take care of it.

Removing these reduntant initialization steps increases
execution speed a lot:

Before:
+ 86.802 us   |    go7007_alloc();
After:
+ 29.595 us   |    go7007_alloc();

Fixes: 6b51061c521ce ("Staging: add the go7007 video driver")
Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/usb/go7007/go7007-driver.c