diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-07-14 12:13:41 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-07-14 12:13:41 -0400 |
commit | 03fe805a098422d27cbbbad29a54ff1349da3622 (patch) | |
tree | 0db9cc9a701203ddcee58e5b907d4fb8ad31b421 /drivers/tc/tc.c | |
parent | 50dd9050e45ce11c575eabcaee8a914caf78fb74 (diff) | |
parent | 5646eda5851e6cfdfa22d41895e3f5daffa643d3 (diff) |
Merge branch 'topic/monotonic' into for-next
Diffstat (limited to 'drivers/tc/tc.c')
-rw-r--r-- | drivers/tc/tc.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/tc/tc.c b/drivers/tc/tc.c index a8aaf6ac2ae2..946562389ca8 100644 --- a/drivers/tc/tc.c +++ b/drivers/tc/tc.c | |||
@@ -129,7 +129,10 @@ static void __init tc_bus_add_devices(struct tc_bus *tbus) | |||
129 | 129 | ||
130 | tc_device_get_irq(tdev); | 130 | tc_device_get_irq(tdev); |
131 | 131 | ||
132 | device_register(&tdev->dev); | 132 | if (device_register(&tdev->dev)) { |
133 | put_device(&tdev->dev); | ||
134 | goto out_err; | ||
135 | } | ||
133 | list_add_tail(&tdev->node, &tbus->devices); | 136 | list_add_tail(&tdev->node, &tbus->devices); |
134 | 137 | ||
135 | out_err: | 138 | out_err: |
@@ -148,7 +151,10 @@ static int __init tc_init(void) | |||
148 | 151 | ||
149 | INIT_LIST_HEAD(&tc_bus.devices); | 152 | INIT_LIST_HEAD(&tc_bus.devices); |
150 | dev_set_name(&tc_bus.dev, "tc"); | 153 | dev_set_name(&tc_bus.dev, "tc"); |
151 | device_register(&tc_bus.dev); | 154 | if (device_register(&tc_bus.dev)) { |
155 | put_device(&tc_bus.dev); | ||
156 | return 0; | ||
157 | } | ||
152 | 158 | ||
153 | if (tc_bus.info.slot_size) { | 159 | if (tc_bus.info.slot_size) { |
154 | unsigned int tc_clock = tc_get_speed(&tc_bus) / 100000; | 160 | unsigned int tc_clock = tc_get_speed(&tc_bus) / 100000; |