aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2012-08-19 18:32:27 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-09-14 13:04:16 -0400
commit4b961180ef275035b1538317ffd0e21e80e63e77 (patch)
tree550e2aff072691ed91e4ad703637ffaf14f1144d /drivers/media
parent612cd9e87496cc34c29ff3a3c0adb52cd816c3b6 (diff)
[media] rc: ite-cir: Initialise ite_dev::rdev earlier
ite_dev::rdev is currently initialised in ite_probe() after rc_register_device() returns. If a newly registered device is opened quickly enough, we may enable interrupts and try to use ite_dev::rdev before it has been initialised. Move it up to the earliest point we can, right after calling rc_allocate_device(). Reported-and-tested-by: YunQiang Su <wzssyqa@gmail.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/rc/ite-cir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c
index 36fe5a349b9..24c77a42fc3 100644
--- a/drivers/media/rc/ite-cir.c
+++ b/drivers/media/rc/ite-cir.c
@@ -1473,6 +1473,7 @@ static int ite_probe(struct pnp_dev *pdev, const struct pnp_device_id
1473 rdev = rc_allocate_device(); 1473 rdev = rc_allocate_device();
1474 if (!rdev) 1474 if (!rdev)
1475 goto failure; 1475 goto failure;
1476 itdev->rdev = rdev;
1476 1477
1477 ret = -ENODEV; 1478 ret = -ENODEV;
1478 1479
@@ -1604,7 +1605,6 @@ static int ite_probe(struct pnp_dev *pdev, const struct pnp_device_id
1604 if (ret) 1605 if (ret)
1605 goto failure3; 1606 goto failure3;
1606 1607
1607 itdev->rdev = rdev;
1608 ite_pr(KERN_NOTICE, "driver has been successfully loaded\n"); 1608 ite_pr(KERN_NOTICE, "driver has been successfully loaded\n");
1609 1609
1610 return 0; 1610 return 0;