diff options
Diffstat (limited to 'drivers/rtc/rtc-pcap.c')
-rw-r--r-- | drivers/rtc/rtc-pcap.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/rtc/rtc-pcap.c b/drivers/rtc/rtc-pcap.c index 539a90b98bc5..40b5c630bc7d 100644 --- a/drivers/rtc/rtc-pcap.c +++ b/drivers/rtc/rtc-pcap.c | |||
@@ -156,10 +156,8 @@ static int __init pcap_rtc_probe(struct platform_device *pdev) | |||
156 | 156 | ||
157 | pcap_rtc->rtc = devm_rtc_device_register(&pdev->dev, "pcap", | 157 | pcap_rtc->rtc = devm_rtc_device_register(&pdev->dev, "pcap", |
158 | &pcap_rtc_ops, THIS_MODULE); | 158 | &pcap_rtc_ops, THIS_MODULE); |
159 | if (IS_ERR(pcap_rtc->rtc)) { | 159 | if (IS_ERR(pcap_rtc->rtc)) |
160 | err = PTR_ERR(pcap_rtc->rtc); | 160 | return PTR_ERR(pcap_rtc->rtc); |
161 | goto fail; | ||
162 | } | ||
163 | 161 | ||
164 | timer_irq = pcap_to_irq(pcap_rtc->pcap, PCAP_IRQ_1HZ); | 162 | timer_irq = pcap_to_irq(pcap_rtc->pcap, PCAP_IRQ_1HZ); |
165 | alarm_irq = pcap_to_irq(pcap_rtc->pcap, PCAP_IRQ_TODA); | 163 | alarm_irq = pcap_to_irq(pcap_rtc->pcap, PCAP_IRQ_TODA); |
@@ -167,17 +165,14 @@ static int __init pcap_rtc_probe(struct platform_device *pdev) | |||
167 | err = devm_request_irq(&pdev->dev, timer_irq, pcap_rtc_irq, 0, | 165 | err = devm_request_irq(&pdev->dev, timer_irq, pcap_rtc_irq, 0, |
168 | "RTC Timer", pcap_rtc); | 166 | "RTC Timer", pcap_rtc); |
169 | if (err) | 167 | if (err) |
170 | goto fail; | 168 | return err; |
171 | 169 | ||
172 | err = devm_request_irq(&pdev->dev, alarm_irq, pcap_rtc_irq, 0, | 170 | err = devm_request_irq(&pdev->dev, alarm_irq, pcap_rtc_irq, 0, |
173 | "RTC Alarm", pcap_rtc); | 171 | "RTC Alarm", pcap_rtc); |
174 | if (err) | 172 | if (err) |
175 | goto fail; | 173 | return err; |
176 | 174 | ||
177 | return 0; | 175 | return 0; |
178 | fail: | ||
179 | platform_set_drvdata(pdev, NULL); | ||
180 | return err; | ||
181 | } | 176 | } |
182 | 177 | ||
183 | static int __exit pcap_rtc_remove(struct platform_device *pdev) | 178 | static int __exit pcap_rtc_remove(struct platform_device *pdev) |