aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/misc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-05-12 15:47:49 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-05-12 15:47:49 -0400
commited1e33dded773ead96d047a34286e27feafd0505 (patch)
treedb388419a58568ed6e6ec46889ad6920feb03e14 /drivers/input/misc
parent422ce5a97570cb8a37d016b6bc2021ae4dac5499 (diff)
parentc52c545ead97fcc2f4f8ea38f1ae3c23211e09a8 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input subsystem fixes from Dmitry Torokhov. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: twl6040-vibra - fix DT node memory management Input: max8997-haptic - fix NULL pointer dereference Input: byd - update copyright header
Diffstat (limited to 'drivers/input/misc')
-rw-r--r--drivers/input/misc/max8997_haptic.c6
-rw-r--r--drivers/input/misc/twl6040-vibra.c1
2 files changed, 5 insertions, 2 deletions
diff --git a/drivers/input/misc/max8997_haptic.c b/drivers/input/misc/max8997_haptic.c
index a806ba3818f7..8d6326d7e7be 100644
--- a/drivers/input/misc/max8997_haptic.c
+++ b/drivers/input/misc/max8997_haptic.c
@@ -255,12 +255,14 @@ static int max8997_haptic_probe(struct platform_device *pdev)
255 struct max8997_dev *iodev = dev_get_drvdata(pdev->dev.parent); 255 struct max8997_dev *iodev = dev_get_drvdata(pdev->dev.parent);
256 const struct max8997_platform_data *pdata = 256 const struct max8997_platform_data *pdata =
257 dev_get_platdata(iodev->dev); 257 dev_get_platdata(iodev->dev);
258 const struct max8997_haptic_platform_data *haptic_pdata = 258 const struct max8997_haptic_platform_data *haptic_pdata = NULL;
259 pdata->haptic_pdata;
260 struct max8997_haptic *chip; 259 struct max8997_haptic *chip;
261 struct input_dev *input_dev; 260 struct input_dev *input_dev;
262 int error; 261 int error;
263 262
263 if (pdata)
264 haptic_pdata = pdata->haptic_pdata;
265
264 if (!haptic_pdata) { 266 if (!haptic_pdata) {
265 dev_err(&pdev->dev, "no haptic platform data\n"); 267 dev_err(&pdev->dev, "no haptic platform data\n");
266 return -EINVAL; 268 return -EINVAL;
diff --git a/drivers/input/misc/twl6040-vibra.c b/drivers/input/misc/twl6040-vibra.c
index df3581f60628..42de34b92996 100644
--- a/drivers/input/misc/twl6040-vibra.c
+++ b/drivers/input/misc/twl6040-vibra.c
@@ -257,6 +257,7 @@ static int twl6040_vibra_probe(struct platform_device *pdev)
257 int vddvibr_uV = 0; 257 int vddvibr_uV = 0;
258 int error; 258 int error;
259 259
260 of_node_get(twl6040_core_dev->of_node);
260 twl6040_core_node = of_find_node_by_name(twl6040_core_dev->of_node, 261 twl6040_core_node = of_find_node_by_name(twl6040_core_dev->of_node,
261 "vibra"); 262 "vibra");
262 if (!twl6040_core_node) { 263 if (!twl6040_core_node) {