diff options
author | Libo Chen <clbchenlibo.chen@huawei.com> | 2014-01-04 00:00:30 -0800 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2014-01-04 00:47:36 -0800 |
commit | f048dd1725c85356517c90f7ecf6bdd9f47d4bf3 (patch) | |
tree | cecc2353b7c111fa95de8542ba54f6ea7428037c /drivers/input | |
parent | a9e1d3c04a26bf9fdd9197cee61fa3a17778eb85 (diff) | |
download | op-kernel-dev-f048dd1725c85356517c90f7ecf6bdd9f47d4bf3.zip op-kernel-dev-f048dd1725c85356517c90f7ecf6bdd9f47d4bf3.tar.gz |
Input: twl6040-vibra - add missing of_node_put
We should drop reference to twl6040_core_node device_node once we are done
using it.
Signed-off-by: Libo Chen <libo.chen@huawei.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/misc/twl6040-vibra.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/input/misc/twl6040-vibra.c b/drivers/input/misc/twl6040-vibra.c index 7864b0c..89bca76 100644 --- a/drivers/input/misc/twl6040-vibra.c +++ b/drivers/input/misc/twl6040-vibra.c @@ -276,6 +276,7 @@ static int twl6040_vibra_probe(struct platform_device *pdev) info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL); if (!info) { + of_node_put(twl6040_core_node); dev_err(&pdev->dev, "couldn't allocate memory\n"); return -ENOMEM; } @@ -295,6 +296,8 @@ static int twl6040_vibra_probe(struct platform_device *pdev) of_property_read_u32(twl6040_core_node, "ti,vddvibl-uV", &vddvibl_uV); of_property_read_u32(twl6040_core_node, "ti,vddvibr-uV", &vddvibr_uV); + of_node_put(twl6040_core_node); + if ((!info->vibldrv_res && !info->viblmotor_res) || (!info->vibrdrv_res && !info->vibrmotor_res)) { dev_err(info->dev, "invalid vibra driver/motor resistance\n"); |