firmware: vpd: do not clear statically allocated data
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 24 May 2017 00:07:46 +0000 (17:07 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 May 2017 13:41:20 +0000 (15:41 +0200)
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: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/firmware/google/vpd.c

index 66fd0230605e63f67d6c51aca8564acb724d55c2..4f8f99edbbfab9266d6e62476101e94758ddcc9f 100644 (file)
@@ -317,9 +317,6 @@ static int __init vpd_platform_init(void)
        if (!vpd_kobj)
                return -ENOMEM;
 
-       memset(&ro_vpd, 0, sizeof(ro_vpd));
-       memset(&rw_vpd, 0, sizeof(rw_vpd));
-
        platform_driver_register(&vpd_driver);
 
        return 0;