aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/nvmem.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rtc/nvmem.c')
-rw-r--r--drivers/rtc/nvmem.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/rtc/nvmem.c b/drivers/rtc/nvmem.c
index dce518d5e50e..4312096c7738 100644
--- a/drivers/rtc/nvmem.c
+++ b/drivers/rtc/nvmem.c
@@ -1,11 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* RTC subsystem, nvmem interface
*
* Copyright (C) 2017 Alexandre Belloni
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
*/
#include <linux/err.h>
@@ -46,7 +43,7 @@ static int rtc_nvram_register(struct rtc_device *rtc,
{
int err;
- rtc->nvram = kzalloc(sizeof(struct bin_attribute), GFP_KERNEL);
+ rtc->nvram = kzalloc(sizeof(*rtc->nvram), GFP_KERNEL);
if (!rtc->nvram)
return -ENOMEM;