input synaptics-rmi4: rmi_driver.c storage fix
Subsystems (2)
PATCH 1/1 input synaptics-rmi4: rmi_driver.c storage fix
Do not use kfree() on storage allocated with devm_kzalloc(), eliminating kernel panics on device removal.
I'm not sure how this eluded all the patching that's been going on over the past few weeks, but somehow it did. v1.01 - fix brain hiccup in the commit message.
Reported-by Courtney Cavin <[email protected]>
Reported-by Dmitry Torokhov <[email protected]>
Reported-by Andrew Duggan <[email protected]>
Signed-off-by Christopher Heiny <[email protected]>
Cc Dmitry Torokhov <[email protected]>
Cc Benjamin Tissoires <[email protected]>
Cc Linux Walleij <[email protected]>
Cc David Herrmann <[email protected]>
Cc Jiri Kosina <[email protected]>
---
drivers/input/rmi4/rmi_driver.c | 2 -- 1 file changed, 2 deletions(-)
drivers/input/rmi4/rmi_driver.c +0 -2
@@ -743,7 +743,6 @@ static int rmi_driver_remove(struct device *dev)gpio_free (pdata->attn_gpio);kfree (data->irq_status); -kfree (data);return 0 ; }
@@ -942,7 +941,6 @@ err_destroy_functions: err_free_mem:if (data->gpio_held)gpio_free (pdata->attn_gpio); -kfree (data);return retval <0 ? retval :0 ; }