diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-12-06 23:35:34 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-07 11:39:31 -0500 |
commit | 91046a8a693823d434f0aa70419c48ebeb8e1b11 (patch) | |
tree | 10eb9325fa0a929f00b24485ad3031726c8ba57d /drivers/rtc/rtc-test.c | |
parent | bfc7ee207078e8ca51264355805e6f56b485be4b (diff) |
[PATCH] RTC: handle sysfs errors
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/rtc/rtc-test.c')
-rw-r--r-- | drivers/rtc/rtc-test.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-test.c b/drivers/rtc/rtc-test.c index 6ef9c62d5032..f50a1b8e1607 100644 --- a/drivers/rtc/rtc-test.c +++ b/drivers/rtc/rtc-test.c | |||
@@ -123,11 +123,18 @@ static int test_probe(struct platform_device *plat_dev) | |||
123 | err = PTR_ERR(rtc); | 123 | err = PTR_ERR(rtc); |
124 | return err; | 124 | return err; |
125 | } | 125 | } |
126 | device_create_file(&plat_dev->dev, &dev_attr_irq); | 126 | |
127 | err = device_create_file(&plat_dev->dev, &dev_attr_irq); | ||
128 | if (err) | ||
129 | goto err; | ||
127 | 130 | ||
128 | platform_set_drvdata(plat_dev, rtc); | 131 | platform_set_drvdata(plat_dev, rtc); |
129 | 132 | ||
130 | return 0; | 133 | return 0; |
134 | |||
135 | err: | ||
136 | rtc_device_unregister(rtc); | ||
137 | return err; | ||
131 | } | 138 | } |
132 | 139 | ||
133 | static int __devexit test_remove(struct platform_device *plat_dev) | 140 | static int __devexit test_remove(struct platform_device *plat_dev) |