Home Home > GIT Browse > SLE15
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-05-17 16:28:45 +0200
committerTakashi Iwai <tiwai@suse.de>2019-05-17 16:30:00 +0200
commit5978f7142f6f536bb68ffacc14955d821bcbff51 (patch)
treeeb5fff3b6df9e1ef498a71b483837874d8e82880
parent1754cabd91a5d121ca119db0d6b95393e3107895 (diff)
Input: synaptics-rmi4 - fix possible double free (bsc#1051510).
-rw-r--r--drivers/input/rmi4/rmi_driver.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/input/rmi4/rmi_driver.c b/drivers/input/rmi4/rmi_driver.c
index f5954981e9ee..997ccae7ee05 100644
--- a/drivers/input/rmi4/rmi_driver.c
+++ b/drivers/input/rmi4/rmi_driver.c
@@ -883,7 +883,7 @@ static int rmi_create_function(struct rmi_device *rmi_dev,
error = rmi_register_function(fn);
if (error)
- goto err_put_fn;
+ return error;
if (pdt->function_number == 0x01)
data->f01_container = fn;
@@ -893,10 +893,6 @@ static int rmi_create_function(struct rmi_device *rmi_dev,
list_add_tail(&fn->node, &data->function_list);
return RMI_SCAN_CONTINUE;
-
-err_put_fn:
- put_device(&fn->dev);
- return error;
}
void rmi_enable_irq(struct rmi_device *rmi_dev, bool clear_wake)