提交 dd246486 编写于 作者: D Dmitry Torokhov 提交者: Greg Kroah-Hartman

firmware: vpd: do not clear statically allocated data

ro_vpd and rw_vpd are static module-scope variables that are guaranteed
to be initialized with zeroes, there is no need for explicit memset().
Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
Reviewed-by: NGuenter Roeck <groeck@chromium.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 9920a33e
...@@ -317,9 +317,6 @@ static int __init vpd_platform_init(void) ...@@ -317,9 +317,6 @@ static int __init vpd_platform_init(void)
if (!vpd_kobj) if (!vpd_kobj)
return -ENOMEM; return -ENOMEM;
memset(&ro_vpd, 0, sizeof(ro_vpd));
memset(&rw_vpd, 0, sizeof(rw_vpd));
platform_driver_register(&vpd_driver); platform_driver_register(&vpd_driver);
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册