Commit 5ed12f12 authored by Ilya Shchepetkov's avatar Ilya Shchepetkov Committed by Linus Torvalds
Browse files

drivers/rtc/rtc-pcf2123.c: initialize dynamic sysfs attributes

Dynamically allocated sysfs attributes must be initialized using
sysfs_attr_init(), otherwise lockdep complains: BUG: key <address> not in

Found by Linux Driver Verification project (

Signed-off-by: default avatarIlya Shchepetkov <>
Cc: Chris Verges <>
Cc: Christian Pellegrin <>
Cc: Alessandro Zummo <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent c81758fb
......@@ -43,6 +43,7 @@
#include <linux/rtc.h>
#include <linux/spi/spi.h>
#include <linux/module.h>
#include <linux/sysfs.h>
#define DRV_VERSION "0.6"
......@@ -292,6 +293,7 @@ static int __devinit pcf2123_probe(struct spi_device *spi)
pdata->rtc = rtc;
for (i = 0; i < 16; i++) {
sprintf(pdata->regs[i].name, "%1x", i);
pdata->regs[i].attr.attr.mode = S_IRUGO | S_IWUSR;
pdata->regs[i] = pdata->regs[i].name;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment