mirror of
https://github.com/LibreELEC/LibreELEC.tv
synced 2025-09-24 19:46:01 +07:00
133 lines
3.8 KiB
Diff
133 lines
3.8 KiB
Diff
diff -Naur linux-3.6.11/drivers/media/rc/ati_remote.c linux-3.6.11.patch/drivers/media/rc/ati_remote.c
|
|
--- linux-3.6.11/drivers/media/rc/ati_remote.c 2012-12-28 22:53:15.840572260 +0100
|
|
+++ linux-3.6.11.patch/drivers/media/rc/ati_remote.c 2012-12-28 22:53:29.113472164 +0100
|
|
@@ -877,11 +877,11 @@
|
|
ati_remote = kzalloc(sizeof (struct ati_remote), GFP_KERNEL);
|
|
rc_dev = rc_allocate_device();
|
|
if (!ati_remote || !rc_dev)
|
|
- goto fail1;
|
|
+ goto exit_free_dev_rdev;
|
|
|
|
/* Allocate URB buffers, URBs */
|
|
if (ati_remote_alloc_buffers(udev, ati_remote))
|
|
- goto fail2;
|
|
+ goto exit_free_buffers;
|
|
|
|
ati_remote->endpoint_in = endpoint_in;
|
|
ati_remote->endpoint_out = endpoint_out;
|
|
@@ -929,12 +929,12 @@
|
|
/* Device Hardware Initialization - fills in ati_remote->idev from udev. */
|
|
err = ati_remote_initialize(ati_remote);
|
|
if (err)
|
|
- goto fail3;
|
|
+ goto exit_kill_urbs;
|
|
|
|
/* Set up and register rc device */
|
|
err = rc_register_device(ati_remote->rdev);
|
|
if (err)
|
|
- goto fail3;
|
|
+ goto exit_kill_urbs;
|
|
|
|
/* use our delay for rc_dev */
|
|
ati_remote->rdev->input_dev->rep[REP_DELAY] = repeat_delay;
|
|
@@ -943,26 +943,31 @@
|
|
if (mouse) {
|
|
input_dev = input_allocate_device();
|
|
if (!input_dev)
|
|
- goto fail4;
|
|
+ goto exit_unregister_device;
|
|
|
|
ati_remote->idev = input_dev;
|
|
ati_remote_input_init(ati_remote);
|
|
err = input_register_device(input_dev);
|
|
|
|
if (err)
|
|
- goto fail5;
|
|
+ goto exit_free_input_device;
|
|
}
|
|
|
|
usb_set_intfdata(interface, ati_remote);
|
|
return 0;
|
|
|
|
- fail5: input_free_device(input_dev);
|
|
- fail4: rc_unregister_device(rc_dev);
|
|
+ exit_free_input_device:
|
|
+ input_free_device(input_dev);
|
|
+ exit_unregister_device:
|
|
+ rc_unregister_device(rc_dev);
|
|
rc_dev = NULL;
|
|
- fail3: usb_kill_urb(ati_remote->irq_urb);
|
|
+ exit_kill_urbs:
|
|
+ usb_kill_urb(ati_remote->irq_urb);
|
|
usb_kill_urb(ati_remote->out_urb);
|
|
- fail2: ati_remote_free_buffers(ati_remote);
|
|
- fail1: rc_free_device(rc_dev);
|
|
+ exit_free_buffers:
|
|
+ ati_remote_free_buffers(ati_remote);
|
|
+ exit_free_dev_rdev:
|
|
+ rc_free_device(rc_dev);
|
|
kfree(ati_remote);
|
|
return err;
|
|
}
|
|
diff -Naur linux-3.6.11/drivers/media/rc/ene_ir.c linux-3.6.11.patch/drivers/media/rc/ene_ir.c
|
|
diff -Naur linux-3.6.11/drivers/media/rc/fintek-cir.c linux-3.6.11.patch/drivers/media/rc/fintek-cir.c
|
|
diff -Naur linux-3.6.11/drivers/media/rc/gpio-ir-recv.c linux-3.6.11.patch/drivers/media/rc/gpio-ir-recv.c
|
|
--- linux-3.6.11/drivers/media/rc/gpio-ir-recv.c 2012-12-28 22:53:15.839572268 +0100
|
|
+++ linux-3.6.11.patch/drivers/media/rc/gpio-ir-recv.c 2012-12-28 22:53:29.115472147 +0100
|
|
@@ -79,7 +79,7 @@
|
|
rcdev = rc_allocate_device();
|
|
if (!rcdev) {
|
|
rc = -ENOMEM;
|
|
- goto err_allocate_device;
|
|
+ goto exit_free_dev;
|
|
}
|
|
|
|
rcdev->priv = gpio_dev;
|
|
@@ -104,15 +104,15 @@
|
|
|
|
rc = gpio_request(pdata->gpio_nr, "gpio-ir-recv");
|
|
if (rc < 0)
|
|
- goto err_gpio_request;
|
|
+ goto exit_free_rdev;
|
|
rc = gpio_direction_input(pdata->gpio_nr);
|
|
if (rc < 0)
|
|
- goto err_gpio_direction_input;
|
|
+ goto exit_free_gpio;
|
|
|
|
rc = rc_register_device(rcdev);
|
|
if (rc < 0) {
|
|
dev_err(&pdev->dev, "failed to register rc device\n");
|
|
- goto err_register_rc_device;
|
|
+ goto exit_free_gpio;
|
|
}
|
|
|
|
platform_set_drvdata(pdev, gpio_dev);
|
|
@@ -122,20 +122,19 @@
|
|
IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
|
|
"gpio-ir-recv-irq", gpio_dev);
|
|
if (rc < 0)
|
|
- goto err_request_irq;
|
|
+ goto exit_unregister_device;
|
|
|
|
return 0;
|
|
|
|
-err_request_irq:
|
|
+exit_unregister_device:
|
|
platform_set_drvdata(pdev, NULL);
|
|
rc_unregister_device(rcdev);
|
|
-err_register_rc_device:
|
|
-err_gpio_direction_input:
|
|
+exit_free_gpio:
|
|
gpio_free(pdata->gpio_nr);
|
|
-err_gpio_request:
|
|
+exit_free_rdev:
|
|
rc_free_device(rcdev);
|
|
rcdev = NULL;
|
|
-err_allocate_device:
|
|
+exit_free_dev:
|
|
kfree(gpio_dev);
|
|
return rc;
|
|
}
|
|
diff -Naur linux-3.6.11/drivers/media/rc/ite-cir.c linux-3.6.11.patch/drivers/media/rc/ite-cir.c
|
|
diff -Naur linux-3.6.11/drivers/media/rc/nuvoton-cir.c linux-3.6.11.patch/drivers/media/rc/nuvoton-cir.c
|