Thread (3 messages) 3 messages, 2 authors, 2010-10-27
DORMANTno replies

[patch v2] touchscreen/bu21013_ts: null dereference in error handling

From: Dan Carpenter <hidden>
Date: 2010-10-27 20:26:18
Also in: kernel-janitors
Subsystem: input (keyboard, mouse, joystick, touchscreen) drivers, the rest · Maintainers: Dmitry Torokhov, Linus Torvalds

In the original code "bu21013_data" could be NULL here.

Signed-off-by: Dan Carpenter <redacted>
---
V2:  same thing; different approach.
diff --git a/drivers/input/touchscreen/bu21013_ts.c b/drivers/input/touchscreen/bu21013_ts.c
index ccde586..2ca9e5d 100644
--- a/drivers/input/touchscreen/bu21013_ts.c
+++ b/drivers/input/touchscreen/bu21013_ts.c
@@ -514,7 +514,7 @@ err_free_irq:
 err_cs_disable:
 	pdata->cs_dis(pdata->cs_pin);
 err_free_mem:
-	input_free_device(bu21013_data->in_dev);
+	input_free_device(in_dev);
 	kfree(bu21013_data);
 
 	return error;
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help