diff options
Diffstat (limited to 'drivers/input/misc/twl6040-vibra.c')
-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 7864b0c3ebb3..89bca7647f54 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) | |||
276 | 276 | ||
277 | info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL); | 277 | info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL); |
278 | if (!info) { | 278 | if (!info) { |
279 | of_node_put(twl6040_core_node); | ||
279 | dev_err(&pdev->dev, "couldn't allocate memory\n"); | 280 | dev_err(&pdev->dev, "couldn't allocate memory\n"); |
280 | return -ENOMEM; | 281 | return -ENOMEM; |
281 | } | 282 | } |
@@ -295,6 +296,8 @@ static int twl6040_vibra_probe(struct platform_device *pdev) | |||
295 | of_property_read_u32(twl6040_core_node, "ti,vddvibl-uV", &vddvibl_uV); | 296 | of_property_read_u32(twl6040_core_node, "ti,vddvibl-uV", &vddvibl_uV); |
296 | of_property_read_u32(twl6040_core_node, "ti,vddvibr-uV", &vddvibr_uV); | 297 | of_property_read_u32(twl6040_core_node, "ti,vddvibr-uV", &vddvibr_uV); |
297 | 298 | ||
299 | of_node_put(twl6040_core_node); | ||
300 | |||
298 | if ((!info->vibldrv_res && !info->viblmotor_res) || | 301 | if ((!info->vibldrv_res && !info->viblmotor_res) || |
299 | (!info->vibrdrv_res && !info->vibrmotor_res)) { | 302 | (!info->vibrdrv_res && !info->vibrmotor_res)) { |
300 | dev_err(info->dev, "invalid vibra driver/motor resistance\n"); | 303 | dev_err(info->dev, "invalid vibra driver/motor resistance\n"); |