diff options
Diffstat (limited to 'drivers/media/dvb/ttpci/budget-ci.c')
-rw-r--r-- | drivers/media/dvb/ttpci/budget-ci.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/media/dvb/ttpci/budget-ci.c b/drivers/media/dvb/ttpci/budget-ci.c index adc4b954e5ad..7d193ebc0aea 100644 --- a/drivers/media/dvb/ttpci/budget-ci.c +++ b/drivers/media/dvb/ttpci/budget-ci.c | |||
@@ -224,8 +224,10 @@ static int msp430_ir_init(struct budget_ci *budget_ci) | |||
224 | case 0x1011: | 224 | case 0x1011: |
225 | case 0x1012: | 225 | case 0x1012: |
226 | /* The hauppauge keymap is a superset of these remotes */ | 226 | /* The hauppauge keymap is a superset of these remotes */ |
227 | ir_input_init(input_dev, &budget_ci->ir.state, | 227 | error = ir_input_init(input_dev, &budget_ci->ir.state, |
228 | IR_TYPE_RC5, &ir_codes_hauppauge_new_table); | 228 | IR_TYPE_RC5, &ir_codes_hauppauge_new_table); |
229 | if (error < 0) | ||
230 | goto out2; | ||
229 | 231 | ||
230 | if (rc5_device < 0) | 232 | if (rc5_device < 0) |
231 | budget_ci->ir.rc5_device = 0x1f; | 233 | budget_ci->ir.rc5_device = 0x1f; |
@@ -236,8 +238,10 @@ static int msp430_ir_init(struct budget_ci *budget_ci) | |||
236 | case 0x1017: | 238 | case 0x1017: |
237 | case 0x101a: | 239 | case 0x101a: |
238 | /* for the Technotrend 1500 bundled remote */ | 240 | /* for the Technotrend 1500 bundled remote */ |
239 | ir_input_init(input_dev, &budget_ci->ir.state, | 241 | error = ir_input_init(input_dev, &budget_ci->ir.state, |
240 | IR_TYPE_RC5, &ir_codes_tt_1500_table); | 242 | IR_TYPE_RC5, &ir_codes_tt_1500_table); |
243 | if (error < 0) | ||
244 | goto out2; | ||
241 | 245 | ||
242 | if (rc5_device < 0) | 246 | if (rc5_device < 0) |
243 | budget_ci->ir.rc5_device = IR_DEVICE_ANY; | 247 | budget_ci->ir.rc5_device = IR_DEVICE_ANY; |
@@ -246,8 +250,10 @@ static int msp430_ir_init(struct budget_ci *budget_ci) | |||
246 | break; | 250 | break; |
247 | default: | 251 | default: |
248 | /* unknown remote */ | 252 | /* unknown remote */ |
249 | ir_input_init(input_dev, &budget_ci->ir.state, | 253 | error = ir_input_init(input_dev, &budget_ci->ir.state, |
250 | IR_TYPE_RC5, &ir_codes_budget_ci_old_table); | 254 | IR_TYPE_RC5, &ir_codes_budget_ci_old_table); |
255 | if (error < 0) | ||
256 | goto out2; | ||
251 | 257 | ||
252 | if (rc5_device < 0) | 258 | if (rc5_device < 0) |
253 | budget_ci->ir.rc5_device = IR_DEVICE_ANY; | 259 | budget_ci->ir.rc5_device = IR_DEVICE_ANY; |
@@ -280,6 +286,7 @@ static int msp430_ir_init(struct budget_ci *budget_ci) | |||
280 | return 0; | 286 | return 0; |
281 | 287 | ||
282 | out2: | 288 | out2: |
289 | ir_input_free(input_dev); | ||
283 | input_free_device(input_dev); | 290 | input_free_device(input_dev); |
284 | out1: | 291 | out1: |
285 | return error; | 292 | return error; |
@@ -297,6 +304,7 @@ static void msp430_ir_deinit(struct budget_ci *budget_ci) | |||
297 | del_timer_sync(&dev->timer); | 304 | del_timer_sync(&dev->timer); |
298 | ir_input_nokey(dev, &budget_ci->ir.state); | 305 | ir_input_nokey(dev, &budget_ci->ir.state); |
299 | 306 | ||
307 | ir_input_free(dev); | ||
300 | input_unregister_device(dev); | 308 | input_unregister_device(dev); |
301 | } | 309 | } |
302 | 310 | ||