]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
media: go7007: remove redundant initialization
authorPavel Skripkin <paskripkin@gmail.com>
Sun, 20 Jun 2021 19:45:42 +0000 (21:45 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 15 Oct 2021 09:26:47 +0000 (11:26 +0200)
commitba3e9a316d476f869e188d3da770ab37920f4983
treeedeaf23fc95321d1346125c306dfd54c479c620e
parent88d01ffe9a42aa4f1d0c4d62c30715dd12d12a16
media: go7007: remove redundant initialization

BugLink: https://bugs.launchpad.net/bugs/1946788
[ 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: 866b8695d67e8 ("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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/media/usb/go7007/go7007-driver.c