diff options
author | Paul Fertser <fercerpav@gmail.com> | 2009-10-17 04:47:35 +0400 |
---|---|---|
committer | Paul Fertser <fercerpav@gmail.com> | 2009-10-17 04:52:57 +0400 |
commit | 350d5560bb262e73e1f1c05bf488fea6750a52d6 (patch) | |
tree | 46a2abf96452b8c7abcb206dba8176e60083e23e /drivers/input | |
parent | 3daf677d5e8e4d6a89845952e0a503c4bd57e456 (diff) |
Fix memleak in pcf50633_client_dev_registe
Ported from 207ec43e8c5a54dfc82a0e65af5b8f2765e3cbb8
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/misc/pcf50606-input.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/input/misc/pcf50606-input.c b/drivers/input/misc/pcf50606-input.c index 044438ed662..da78fb92fbc 100644 --- a/drivers/input/misc/pcf50606-input.c +++ b/drivers/input/misc/pcf50606-input.c @@ -63,11 +63,9 @@ pcf50606_input_irq(int irq, void *data) static int __devinit pcf50606_input_probe(struct platform_device *pdev) { struct pcf50606_input *input; - struct pcf50606_subdev_pdata *pdata = pdev->dev.platform_data; struct input_dev *input_dev; int ret; - input = kzalloc(sizeof(*input), GFP_KERNEL); if (!input) return -ENOMEM; @@ -79,7 +77,7 @@ static int __devinit pcf50606_input_probe(struct platform_device *pdev) } platform_set_drvdata(pdev, input); - input->pcf = pdata->pcf; + input->pcf = dev_to_pcf50606(pdev->dev.parent); input->input_dev = input_dev; input_dev->name = "PCF50606 PMU events"; @@ -93,9 +91,9 @@ static int __devinit pcf50606_input_probe(struct platform_device *pdev) kfree(input); return ret; } - pcf50606_register_irq(pdata->pcf, PCF50606_IRQ_ONKEYR, + pcf50606_register_irq(input->pcf, PCF50606_IRQ_ONKEYR, pcf50606_input_irq, input); - pcf50606_register_irq(pdata->pcf, PCF50606_IRQ_ONKEYF, + pcf50606_register_irq(input->pcf, PCF50606_IRQ_ONKEYF, pcf50606_input_irq, input); return 0; |