Re: [PATCH 1/1] input: mt: Fix null pointer warning

From
Henrik Rydberg <hidden>
Date
2012-06-04 14:36:18
Reply to
Sachin Kamat, 2012-06-04
On Mon, Jun 04, 2012 at 04:28:48PM +0530, Sachin Kamat wrote:
quoted hunk ↗ jump to hunk
Fixes the following sparse warning:
drivers/input/input-mt.c:138:40: warning: Using plain integer as NULL pointer

Signed-off-by: Sachin Kamat <redacted>
---
 drivers/input/input-mt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/input/input-mt.c b/drivers/input/input-mt.c
index f658086..70a16c7 100644
--- a/drivers/input/input-mt.c
+++ b/drivers/input/input-mt.c
@@ -135,7 +135,7 @@ EXPORT_SYMBOL(input_mt_report_finger_count);
  */
 void input_mt_report_pointer_emulation(struct input_dev *dev, bool use_count)
 {
-	struct input_mt_slot *oldest = 0;
+	struct input_mt_slot *oldest = NULL;
 	int oldid = dev->trkid;
 	int count = 0;
 	int i;
-- 
1.7.4.1
Applied, thank you.

Henrik
Thread (2 messages) 2 messages, 2 authors, 2012-06-04
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help