Thread (2 messages) 2 messages, 2 authors, 2014-08-15

[PATCH] remove explicit devm_kfree

From: Arjun Sreedharan <hidden>
Date: 2014-08-15 15:26:25
Also in: lkml
Subsystem: input (keyboard, mouse, joystick, touchscreen) drivers, the rest · Maintainers: Dmitry Torokhov, Linus Torvalds

Memory allocated with devm_kzalloc() is freed automatically when device
out of scope.

Signed-off-by: Arjun Sreedharan <redacted>
---
 drivers/input/misc/soc_button_array.c | 1 -
 1 file changed, 1 deletion(-)
diff --git a/drivers/input/misc/soc_button_array.c b/drivers/input/misc/soc_button_array.c
index 5a6334b..123e59f 100644
--- a/drivers/input/misc/soc_button_array.c
+++ b/drivers/input/misc/soc_button_array.c
@@ -131,7 +131,6 @@ soc_button_device_create(struct pnp_dev *pdev,
 err_free_pdev:
 	platform_device_put(pd);
 err_free_mem:
-	devm_kfree(&pdev->dev, gpio_keys_pdata);
 	return ERR_PTR(error);
 }
 
-- 
1.7.11.7
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help